TCH-JimE Posted July 6, 2004 Posted July 6, 2004 Hello, Of all the things I know about htaccess, this is my most probalmatic one. Basically, my domain when acccessed is www.**** which has the index.html file as its first file. However, i want to change this to be say indexa.html Now, i need to use .htaccess to do this, because I am working on an upgrade and hence i need the index.html page still to be present but accessible yet not the default page. However, if I use DirectoryIndex indexa.html, all the folders below the main root change to this too. How can i set it for only the top folder? Jimuni Quote
TCH-Andy Posted July 6, 2004 Posted July 6, 2004 Hi Jimuni, Because the DirectoryIndex indexa.html is recursive, the only way I can see round it is to add DirectoryIndex index.html in all directories immediately below it. Quote
snipe Posted July 13, 2004 Posted July 13, 2004 DirectoryIndex allows multiple arguments - if it can't find the first one you specify, it looks for the second. Making the .htaccess in the website root say: >DirectoryIndex indexa.html index.html Will tell it to FIRST look for a file called indexa.html, and then if it can't find one, look for index.html. This should solve your problem as long as there are no indexa.html's in your subdirs. Quote
djgizmo Posted September 10, 2004 Posted September 10, 2004 snipe, thank your for helping me (indirectly) with the .htaccess "DirectoryIndex" This works great as a internal redirector. I needed www.**** to go to www.****/store/index.php I used >DirectoryIndex /store/index.php This worked perfectly! Hopes this helps others Quote
Deverill Posted September 10, 2004 Posted September 10, 2004 I'm glad it's working for you. Just wanted to throw in that when I do that kind of thing I just rename my stable file to index.html and work on indexa.html. I can go to the test version in the URL and it doesn't break anyone else coming to my site. Just a though. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.