Mortgage - Remortgages - Loans - Remortgages - Wire Transfer

PDA

View Full Version : .htaccess 301 redirect


rdv817
Nov 2nd 2007, 7:04 pm
I have an add on domain that redirects to the primary domain in my hostgator account.......the add on domain is like addondomain.themaindomain.com

I need addondomain.com to point to addondomain.com, NOT themaindomain.com

I don't understand why this is so hard to do!!!! I followed hostgators instructions on how to do it via the Cpanel and it did not work...By doing it the way their instructions said i created the following code in an .htaccess file...

RewriteEngine on
RewriteCond %{HTTP_HOST} ^addondomain.themaindomain.com$ [OR]
RewriteCond %{HTTP_HOST} ^www.addondomain.themaindomain.com$
RewriteRule ^(.*)$ http://www.addondomain.com [R=301,L]

I called support, and they told me that I have a line of code in themaindomain.com's .htaccess file that should be removed.....I removed it, it still didn't work....I do not see how that line of code could be the problem since I have 2 other add on domains working just fine.

Please Help


EDIT: Never mind, support finally fixed it for me :)