htaccess Elite

.htaccess tutorial


All times are UTC [ DST ]





Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: redirecting .htaccess addon domain problem
PostPosted: 22 Jun 2008 20:02 
Offline

Joined: 22 Jun 2008 19:37
Posts: 2
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


Top
 Profile  
 
 Post subject: Re: redirecting .htaccess addon domain problem
PostPosted: 25 Jun 2008 21:16 
Offline

Joined: 22 Jun 2008 19:37
Posts: 2
Hostgator Live Chat was able to help me fix it.

They put
Code:
DirectoryIndex index.php

at the very bottom of the .htaccess file in the SUBDOMAIN folder.

Both sites seem to be working correctly now.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: MSN [Bot], MSNbot Media and 5 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
cron
Powered by phpBB