Go Back   cPanel Forums > General Discussion > cPanel Newbies

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 10-01-2009, 09:13 PM
Registered User
 
Join Date: May 2006
Posts: 4
SludgeMeister is on a distinguished road
Cpanel Parked Domains Problem / Redirects Cpanel Error

Hello,

We have domain.com as the primary domain for the site in question.

We migrated from DirectAdmin to Cpanel a few months ago. DirectAdmin allowed "Domain Pointers" (aka Redirects) to be pointed at the domain.com. We own domain.org/.net/.co.uk which all were simply pointed at domain.com so when someone visited www.domain.co.uk it redirected to www.domain.com

When we started up with Cpanel we used the "Park Domain" option which unfortunately has simply mirrored the site. e.g.

If someone visits www.domain.co.uk it remains as domain.co.uk/page.html rather than redirect to www.domain.com/page.html

As a result, Google et al have picked up both domains/sites and we are getting penalised for duplicate content.

I am assuming the best way to tackle this is to generate rules within htaccess to solve it.

I have tried several combinations of htaccess rules to permenantly redirect any visitors who come to the site from www.domain.co.uk so it simply redirects them to www.domain.com but I haven't been able to get any to work. Some I've tried:

Code:
RewriteCond %{HTTP_HOST} ^domain.co.uk$ [OR] 
RewriteCond %{HTTP_HOST} ^www.domain.co.uk$ 
RewriteRule ^(.*)$ "http\:\/\/www\.domain\.com$1" [R=301,L]
Code:
redirectMatch 301 ^(.*)$ http://www.domain.co.uk
redirectMatch permanent ^(.*)$ http://www.domain.com
Code:
Redirect 301 http://www.domain.co.uk http://www.domain.com
What I need to do of course is preserve the entries within the search engines. So for example any entries that are present for www.domain.co.uk/about-us.html need to be redirected to www.domain.com/about-us.html

After requesting some help on the WHT forum a helpful member there suggested the following:

Quote:
1. Log in to you cPanel
2. Under "Domains" go to "Redirects"
3. Set Type as "Permanent (301)"
4. Select your domain from the drop down menu
5. Leave the text box after "/" blank
6. Set "redirects to" to your new domain e.g. http://newdomain.com/ (remember to put http:// and a trailing "/")
7. Set "www redirection" to "Redirect with or without www."
8. Check "Wild Card Redirect"
9. Click on "Add"
So I have tried this before trying the htaccess solution, however I am having some problems. When I try to follow the above in Cpanel I get the following error:

There was a error adding redirect.

Quote:
Show Details

Apache detected an error in the Rewrite config.
Syntax error on line 69 of /home/*****/public_html/.htaccess.9BBe1dSE2Krl*************
Redirect takes two or three arguments, an optional status, then document to be redirected and destination URL
Please try again.
I am unsure what is causing this.

I'd appreciate if someone could help me with this issue.

Thanks,

Tom
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 10-02-2009, 08:48 AM
Registered User
 
Join Date: May 2006
Posts: 4
SludgeMeister is on a distinguished road
Anyone able to help me with this?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 10-02-2009, 10:11 AM
cPanelDavidG's Avatar
Technical Product Specialist
 
Join Date: Nov 2006
Location: Houston, TX
Posts: 8,615
cPanelDavidG is on a distinguished road
In your cPanel interface, click on "Parked Domains."

Now click on "Manage Redirection."

Here, type domain.com as the URL you want domain.co.uk to redirect to.

Save the settings. If this does not work, please let me know. I tested this on a server running the latest 11.24 RELEASE.
__________________
- cPanel David G., Lead Forum Administrator & cPanel Technical Product Specialist
Do you want 50% off your cPanel Conference Admission? View Coupon Code
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 10-03-2009, 12:02 AM
Registered User
 
Join Date: May 2006
Posts: 4
SludgeMeister is on a distinguished road
Hi DavidG,

Unfortunately the same error occurs.

I have submitted a ticket to the Cpanel Support Desk (ID: 499885).

Thank you,

Tom
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 10-03-2009, 11:16 AM
cpanelgregk's Avatar
cPanel Staff (Administrators)
 
Join Date: Sep 2009
Posts: 13
cpanelgregk is on a distinguished road
This one actually threw me for a loop for a few. Then I found that .htaccess was interfering, so I moved it out of the way and created a new .htaccess with the 301 redirects, and it worked properly.

That meant that something in Joomla's .htaccess was interfering, so I moved the original .htaccess back, and put the 301 Redirects at the very top of .htaccess, and they worked properly.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Thread Tools
Display Modes

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

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
I can't remove permanent redirects in cPanel Redirects zpnd cPanel Newbies 8 06-03-2009 11:55 AM
Pointing parked domains in cPanel to a different directory zaggs cPanel and WHM Discussions 1 09-15-2008 02:12 PM
User had addon domains, after cpanel upgrade, they are now parked domains Oriso cPanel and WHM Discussions 0 01-09-2008 11:41 AM
Header Redirects on "Parked"Domains tj111 cPanel and WHM Discussions 1 09-12-2007 05:16 PM
Parked domains go to wrong site, do not show up in cpanel F Brown cPanel and WHM Discussions 2 08-31-2003 11:51 PM


All times are GMT -5. The time now is 10:32 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
© cPanel Inc