Is it possible to have a subdomain use it's own htaccess (rather than that of it's parent domain)?
This is a discussion on Quick subdomain/htaccess question in the VPS & Dedicated forum
Is it possible to have a subdomain use it's own htaccess (rather than that of it's parent domain)? ...
Is it possible to have a subdomain use it's own htaccess (rather than that of it's parent domain)?
Yes, any directory in your public_html can have an .htaccess file. The way Apache works is it first looks at the directives set in the main configuration file for your site (httpd.conf, which JPC controls) then it starts walking through your site, starting a public_html and drilling down into each directory in the requet's path, looking for .htaccess files, until it reaches the directory that contains the requested file. As it walks through the directories the deeper level settings overwrite similar settings that may have been set higer up the chain.
So, basically, if you put an .htaccess file in your subdomain directory you can override any settings from your public_html folder's .htaccess and/or it can apply new settings that aren't relavent to the main site. However, if you set something in the public_html .htaccess file that you don't override in the subdomain's file the subdomain will inherit that setting from public_html.
--Jason
Copyright © 2011 JaguarPC.com
Bookmarks