Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

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:
    51
    #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:
    58
    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
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. wookercn

    wookercn Registered

    Joined:
    Dec 23, 2009
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    51
    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:
    66
    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.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  5. InstaCarma_Tech

    InstaCarma_Tech Well-Known Member

    Joined:
    Apr 22, 2009
    Messages:
    228
    Likes Received:
    1
    Trophy Points:
    68
    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]
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice