View Full Version : .htaccess and sub-directories
GTech
Apr 2nd 2005, 8:07 pm
I have a directory site that uses .htaccess and mod_rewrite to create SEF urls. Works great.
I've created a new sub-directory called /shopping
I'm putting a shopping/store app there that also uses .htaccess and mod_rewrite for it's own code.
The problem is, the root .htaccess seems to be taking priority over the .htaccess in the /shopping directory.
Is there any directive or command I can add to the .htaccess in /shopping to tell it not to use anything from the root .htaccess?
fryman
Apr 2nd 2005, 8:17 pm
can't you put another .htaccess in that folder?
GTech
Apr 2nd 2005, 8:35 pm
I have, and it doesn't seem to make a difference.
I know both work individually well. It's when I add the amazon shopping script I have to the shopping directory, the mod_rewrite seems to inherit from the root.
honey
Apr 2nd 2005, 10:30 pm
post the codes of both your .htaccess. Your rules might be similar overwriting each other. Otherwise, in all subcats, the .htaccess overwrites the parent.
fryman
Apr 2nd 2005, 10:32 pm
Make sure you have the right .htacess in the folder and not just a copy of the main one
GTech
Apr 3rd 2005, 5:45 am
Thanks both for your willingness to help.
I think I've figured out the problem. In the sub directory "/shopping" .htaccess, I had:
RewriteEngine on
RewriteBase /
I changed it to:
RewriteEngine on
RewriteBase /shopping/
and now everything is working as it should be. Another day, another .htaccess mystery solved :)
Thanks again for your offers to help.
just-4-teens
Apr 3rd 2005, 1:30 pm
I have a directory site that uses .htaccess and mod_rewrite to create SEF urls. Works great.
I've created a new sub-directory called /shopping
I'm putting a shopping/store app there that also uses .htaccess and mod_rewrite for it's own code.
The problem is, the root .htaccess seems to be taking priority over the .htaccess in the /shopping directory.
Is there any directive or command I can add to the .htaccess in /shopping to tell it not to use anything from the root .htaccess?
i had a similar problem with my directory and only .htaccess would work was if i create a sub-domain for it instead of a sub-dir
vBulletin® v3.8.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.