homepage Welcome to WebmasterWorld Guest from 54.145.183.169
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Pubcon Platinum Sponsor 2014
Home / Forums Index / Code, Content, and Presentation / Apache Web Server
Forum Library, Charter, Moderators: Ocean10000 & incrediBILL & phranque

Apache Web Server Forum

    
Apache: redirecting several folders from main domain to addon domain
projectmanuk

5+ Year Member



 
Msg#: 4087071 posted 2:43 pm on Feb 25, 2010 (gmt 0)

Hi everyone,
I am hoping to find someone who could help me here.

We have two sites, let's say domain1.com and domain2.com. A while back, when the two sites were hosted on different accounts, we redirected some folders from 1 to 2. The way we did it is by adding the following lines into .htaccess (we are on linux server using apache).

For example: redirect [domain1.com...] Welcome to DOMAIN2.COM

This has worked fine. Since we move the hosting to UH, we hosted the two site in one account by using domain2 as an addon domain. The files are uploaded in a subfolder called domain2. The sites worked fine but the redirections no longer work. It appears to me that the redirections set in the root folder (public_html) .htaccess would also affect on the domain2. I know this because when I tried to set up new redirection lines from page to page (on domain1), I had to add the domain1 root, otherwise it will redirect the same page on domain2.

I hope I have explained the issue as clear as possibly can. Any ideas are welcome, our ranking has dropped since these redirections stopped working.

Thanks in advance.
Best,
Jay

 

projectmanuk

5+ Year Member



 
Msg#: 4087071 posted 2:47 pm on Feb 25, 2010 (gmt 0)

I found a post in this forum in 2006 about how to stop main domain .htaccess from affecting addon domain. I tried that, which is fine, but it still does not solve the problem.
The redirection lines in the main domain .htaccess is like the following:
redirect www.domain.d/MSP/ www.domain2.d/MSP/

All other redirections from page to page on domain1 work fine, the problem is for redirection from domain1 to domain2. Thanks.

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / Apache Web Server
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved