I am hosted with hostgator and have created my MAIN site, using the Soholaunch builder. It was a move over from another hosting provider. Since my old site was made using basic .html extensions, I have used 301 redirects in my .htaccess file to make sure any old links are being redirected to the new site. That was all working fine, UNTIL I added a addon domain which I built using Joomla. The addon domain is in it's own folder, but that folder is within my public_html folder of the main site. That's how cpanel created it when I added it in.
What is happening is that any time you type in the addons domain, it redirects to my main domain, they are completely different companies and/or sites. I finally figured out it was this line in my .htaccess document that was doing it:
Code:
redirect 301 /index.html http://www.maindomain.com/Home_Page.php
I have already deleted index.html file from the main directory. But I have a lot of OLD back-links that point directly to that page so I get a number of people coming to my site that way and I don't want to lose them because they get an error page.
Anyway, what I need to know is HOW I can redirect my old index.html files (for my MAIN domain) to the new .php version WITHOUT also causing my addon domains to be redirected to it as well. Is there a way to do this?
Is there something I can add in my htaccess file in the SUBDOMAIN that will work? Or does the server read the main site's htaccess first, EVEN WHEN the domain being called up is the sub-domain?
Or is there some way to redirect all old
.html links to my new homepage? For example:
http://www.mydomain.com/anyoldpagehere.html would redirect to
http://www.mydomain.com/homepage.php