UnitedForums - UK Web Hosting Forum UnitedHosting Community Hosting Forums
Network and Server StatusCustomer SupportUK Web Hosting
UnitedHostingUnitedHosting Sitemap UK Hosting ForumUK Web HostingWeb Hosting ForumsUK Reseller HostingWeb Host CommunityUK Managed Dedicated ServersHosting Help and SupportUK Domain Name Registration

Go Back   UnitedForums.co.uk > UnitedHosting Community > Website Development & Scripting

Reply
 
Thread Tools Rate Thread Display Modes
Old 25th February 2010, 10:06 AM   #1 (permalink)
jaygao
Registered User
 
Join Date: Feb 2010
Posts: 2
Redirect pages from main domain and an addon domain

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 http://www.domain1.com/MSP/ 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
jaygao is offline   Reply With Quote
Old 25th February 2010, 02:01 PM   #2 (permalink)
percepts
Senile Member
 
percepts's Avatar
 
Join Date: Mar 2005
Posts: 1,235
Quote:
Originally Posted by jaygao View Post
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 http://www.domain1.com/MSP/ 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
put both sites in addon domains
__________________
An old dog learning new tricks
percepts is offline   Reply With Quote
Old 25th February 2010, 02:09 PM   #3 (permalink)
jaygao
Registered User
 
Join Date: Feb 2010
Posts: 2
But I thought there should always be a site as the main domain? Do you mean I leave the main directory empty, but create 2 subfolders for the two domains? Would there be any other way of fixing this without touching the main domain?
Thanks for your help.
jaygao is offline   Reply With Quote
Old 25th February 2010, 04:11 PM   #4 (permalink)
percepts
Senile Member
 
percepts's Avatar
 
Join Date: Mar 2005
Posts: 1,235
You will have to have a domain name for the root but it would mean it is useless if you want to use htaccess. But that is what UH have decided to deliver.

Ask support for a solution.
__________________
An old dog learning new tricks
percepts is offline   Reply With Quote
Old 25th February 2010, 10:45 PM   #5 (permalink)
Vger
Senior Member
 
Join Date: Sep 2003
Location: United Kingdom
Posts: 3,024
When you refer to "add-on" domain are you talking about an alias or a subdomain? They would be treated differently by .htaccess.

If, for instance, Domain 2 was previously a domain with its own hosting but is now an alias of Domain 1 (with no physical existence of its own) then the redirection is only possible if Domain 2 had unique page and/or folder names of its own. If the page names of Domain 2 match those of Domain 1 then the redirect would not work as you wish.

If Domain 2 is now a Subdomain of Domain 1 then the Subdomain does have physical existence of its own - in which case you'd add the Domain 2 name as an alias of Domain 1 and use .htaccess redirects to take people trying to access Domain 2 to the Subdomain.

You can do a lot with .htaccess redirects but it does depend upon your level of knowledge.

Last year we had to roll up 6 or 7 domains into one with redirects from the aliases to folders on the main domain, and 2 of the sites were ASP based sites with dynamic ASP page addresses which had to be redirected to dynamic PHP addresses.

Vger
__________________
Working with computers is a bit like getting old - the longer you're around the more wrinkles you find!
Vger is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off


All times are GMT. The time now is 06:43 PM.

UK Web Hosting  |  UK Reseller Hosting  |  UK Dedicated Servers UnitedHosting  |  UnitedSupport  |  SEO by vBSEO 3.0.0
Copyright © 1998-2009 United Communications Limited. All Rights Reserved. Registered in England and Wales 3651923 - VAT Reg No. 737662309