The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Subdomain Redirect Issue

Discussion in 'General Discussion' started by PigeonParty, Nov 26, 2011.

  1. PigeonParty

    PigeonParty Registered

    Joined:
    Nov 26, 2011
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Website Owner
    Hey guys,

    I have two wordpress sites and am trying to have my old one redirect to my new one. Using cpanel's redirect tool the homepage of the old one successfully redirects to the new one, however any subdomains of the old site will not redirect to the new one, even though I've used the same procedure to redirect them as I have with the homepage.

    I've used the redirect tool to set up a 301 redirect. Is there another step I should be taking? I can't figure out why the homepage redirect works but none of the subdomain redirects do.

    Thanks for any help!
     
    #1 PigeonParty, Nov 26, 2011
    Last edited by a moderator: Dec 2, 2011
  2. alexhumphrey

    alexhumphrey Registered

    Joined:
    Dec 16, 2011
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Website Owner
    I'm having the same problem. Anyone figure out how to fix this?
     
  3. jgramp

    jgramp Registered

    Joined:
    Dec 18, 2011
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Website Owner
    Add the following to your .htaccess file instead of using the redirect feature in cpanel. This works for me:

    Options -Indexes +FollowSymLinks

    RewriteEngine On

    RewriteBase /

    RewriteCond %{HTTP_HOST} ^example.com [NC]

    RewriteRule ^(.*)$ http://www.example.com$1 [L,R=301]

    RedirectMatch 301 ^/blog/(.*)$ http://blog.example.com/$1

    See cPanelTristan's post in this thread: http://forums.cpanel.net/f34/redirect-main-domain-but-not-subdomain-221272.html
     
Loading...

Share This Page