Forum Moderators: phranque
Have the following sub domains:
sub1.mydomain.com
sub2.mydomain.com
sub3.mydomain.com
Is it possible by placing an htacess file in the ROOT of mydomain.com to redirect the pages called up on the sub domain requests to NEW individual sites?
EG sub1.mydomain.com/help.htm redirects to www.newdomain1.com/help.htm and sub2.mydomain.com/anotherpage.htm redirects to www.newdomain2.com/anotherpage.htm etc
Thanks
The answer depends on how those subdomains were configured. If you have put an .htaccess file in the top Web-accessible directory of your main domain that looks at the requested hostname and 'steers' the request to the subdirectory corresponding to that subdomain, then the answer would be "yes."
If the subdomain-to-subdirectory mapping is done in httpd.conf (for example, using a 'control panel'), then you won't be able to have a single .htaccess file that affects all subdomains for the simple reason that .htaccess files are only executed if they reside in the directory path between the server root and the file that is ultimately served.
Jim
So is there a way to get my .htaccess file to work with subdomain.mydomain.com?
My subdomains are set up using a control panel so I think it's with httpd.config.
the actual path of my subdomain's pages are in the form www.mydomain.com/_subdomain.... so can I put another .htaccess file in there, which points to "../.htaccess" or something?
thanks :)