Skip to main content
gamedev.net
🔒 Locked

[web] .htaccess[SOLVED]

Started by levjs Feb 1, 2006 at 9:51 PM 3 replies 700+ views
Original Post
levjs
levjs
Hi, I'm using a .htaccess file in my root directory to change the page the default directory using DirectoryIndex home.asp When I do this, then it changes it for all subdirectories too. For example, in http://www.mysite.org/snobbinsfilms/, it looks for home.asp as well, where-as before, it knew what the homepage was. Is there anyway I can make it for JUST that directory? Thanks Levi [Edited by - levjs on February 2, 2006 8:32:23 AM]
Sander
Sander
You shouls use something like this:

DirectoryIndex home.asp index.php index.shtml index.html index.htm


left entries trump right entries, so if there's a home.asp and an index.html, Apache will use home.asp.
levjs
levjs
Oh, ok. Duh. I've even seen that before, but I didn't think about using it for my problem. Thanks alot.
Levi
gavco98
gavco98
to add to the above, sub directories automatically inherit permissions for the parent directory, hence why it changed in them all. I believe there is an apache setting to stop them inheriting.

Might be useful if you ever have a similar problem.
Gavin Coates
[size="1"]IT Engineer / Web Developer / Aviation Consultant
[size="1"][ Taxiway Alpha ] [ Personal Home Page ]

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.