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.

How to config URL Redirect in WHM/cPanel ?

Discussion in 'General Discussion' started by wookercn, Dec 24, 2009.

  1. wookercn

    wookercn Registered

    Joined:
    Dec 23, 2009
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    #1 wookercn, Dec 24, 2009
    Last edited: Dec 24, 2009
  2. JPC-Martin

    JPC-Martin Active Member
    PartnerNOC

    Joined:
    May 31, 2008
    Messages:
    37
    Likes Received:
    1
    Trophy Points:
    8
    You can use utility 'Redirects' which allow you to make a specific web page redirect to another page and display the contents of that page.

    You can find this at cPanel >> Domains >> Redirects
     
  3. wookercn

    wookercn Registered

    Joined:
    Dec 23, 2009
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    Thanks for your replay.

    Redirects function can redirect www.aaa.com/dir to www.bbbbbbbb.com/abc/ttt.html

    but, I need to redirect a subdomain to a URL,such as
    abc.aaa.com ---> www.bbbbbbbb.com/abc/ttt.html

    Thanks
     
    #3 wookercn, Dec 25, 2009
    Last edited: Dec 25, 2009
  4. thewebhostingdi

    thewebhostingdi Well-Known Member

    Joined:
    Jan 10, 2008
    Messages:
    141
    Likes Received:
    0
    Trophy Points:
    16
    You will have select your subdomain instead of your main domain in the option from the combo box mentioned in the Redirects option from your cpanel. or you can manually write the forwarding rewrite rule in your .htaccess file.
     
  5. InstaCarma_Tech

    InstaCarma_Tech Well-Known Member

    Joined:
    Apr 22, 2009
    Messages:
    228
    Likes Received:
    1
    Trophy Points:
    18
    Try the following htaccess code :

    Code:
     RewriteEngine On
    RewriteCond %{HTTP_HOST}%{REQUEST_URI} ^bbs.aaaa.com/$ [NC,OR]
    RewriteCond %{HTTP_HOST}%{REQUEST_URI} ^www.bbs.aaaa.com/$ [NC]
    RewriteRule ^(.*)$ http://www.bbbb.com/bbs/$1 [r=301,nc]
     
Loading...

Share This Page