cancel
Showing results for 
Search instead for 
Did you mean: 

Anyway to stop htaccess file not applying to sub-directories

N/A

Anyway to stop htaccess file not applying to sub-directories

I have three Websites hosted by Force9 each hosted in their own subdirectory off the root. I recently had to add an htaccess file to this root directory to redirect users from an old website address to a new domain I had purchased (again hosted in a sub-directory).

However this htaccess file is now applying site-wide and across all aliases meaning all three of my sites now point to just one site Cry

As I understand htaccess files cascade downwards, so that if I have a .htaccess file in my root directory, /,
and another in a sub-directory called /Wright, then when a file is requested from the /Wright directory Apache will merge the two files and use all the directives.

Is there any way I can stop this behaviour - I have a 301 redirect in my root directory and I don’t want it to apply to the /Wright sub-directory. I have tried unsuccessfully putting a 301 redirect in the /Wright sub-directory to override the root but this has not been successful.

Thanks in hopeful anticipation folks
2 REPLIES
N/A

Anyway to stop htaccess file not applying to sub-directories

Taps Microphone to check it's still working :roll:
N/A

Anyway to stop htaccess file not applying to sub-directories

Checks Deodorant Shockedops: Cry