How can i set a default page for a specific folder

Hi all!! :slight_smile: Im testing my site on local host before uploading it however, ive got a problem: i dont know how to set a default page for a specific folder without naming it index.***
For example: Ive got a link like this: and there r 3 file 1.html, 2.html, 3.html in eg folder. I want to set 2.html to be appeared when people type that link into the address bar without renaming it. Can anyone tell me how to do? Thanx 4 reading my post!! :slight_smile:

Try the DirectoryIndex directive:
DirectoryIndex index.html 2.html

Visitors to will first try index.html and then 2.html. This goes in a .htaccess file. I’m not sure if it’s recursive in that putting the .htaccess in root will take effect throughout the entire website, but my guess is that it is.


Yeah ill try that, thanks a lot sdayman! :slight_smile: