...

View Full Version : 301 redirect of index.html also redirects subdomain....



yaMz
08-17-2011, 08:30 PM
How can I successfully do:


redirect 301 /index.html www.mysite.com/page.extension


without


subdomain.mysite.com being redirected as well


Any help would be appreciated.

Cags
08-18-2011, 07:29 AM
I'm assuming you have the code in an .htaccess file. Either...

Have the sub-domains DocumentRoot different to the main one, so that it never hit the file (unlikely to be useful as you are obviously using the same code base).
Move the code into the VirtualHost for the main domain (probably haven't got access to it, especially if you're on shared hosting).
Use mod_rewrite to redirect instead.


RewriteCond %{HTTP_HOST} ^www.mysite.com
RewriteRule index.html /page.extension [R=301,L]



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum