Mobile app version of vmapp.org
Login or Join
Murray155

: Stop .htaccess automatically influencing subfolders In my webhosting package, the primary domain points to the root of my file system and any extra domains that I add point to subfolders. The

@Murray155

Posted in: #Htaccess

In my webhosting package, the primary domain points to the root of my file system and any extra domains that I add point to subfolders.

The problem is, the .htaccess for the primary is influencing not just the primary website's files, but also secondary websites in the subfolders. This is causing confusion and is not very desirable.

So, is there a way to tell the secondary websites to ignore all .htaccess statements bleeding down from the root? Or do I have to explicitly override each statement in each .htaccess each time I add/change the one in the root?

(It is shared hosting so I have limited control, but any answers gratefully accepted as I may be able to use this to hastle the provider).

10.02% popularity Vote Up Vote Down


Login to follow query

More posts by @Murray155

1 Comments

Sorted by latest first Latest Oldest Best

 

@Murray155

This isn't really a property of .htaccess files, but of Apache configuration directives in general - many directives being applied in a <Directory> or <Location> block will apply to child directories, and .htaccess files are essentially another way to configure <Directory> blocks.

If you had control over where the subdomains were in the directory structure, or the configuration of the virtual hosts for the subdomains, that would be a much better solution - having the subdomains as subdirectories of a main domain is a pretty bad design.

The behavior of directives is very dependant on which directives you're using - can you provide details about what directives you're having problems with?

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme