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.

Url Forwarding?

Discussion in 'General Discussion' started by Daemon1, Apr 24, 2004.

  1. Daemon1

    Daemon1 Well-Known Member

    Joined:
    Nov 26, 2003
    Messages:
    87
    Likes Received:
    0
    Trophy Points:
    6
    Hi,

    I have been reading about Addon-Domains but this doesnt seem the process to do url forwarding. Is there any other way apart from the dodgy html meta refresh forward to foward for example; domain-name.com to domainname.com in cpanel?
     
  2. BrightAdmin

    BrightAdmin Well-Known Member

    Joined:
    Feb 29, 2004
    Messages:
    204
    Likes Received:
    0
    Trophy Points:
    16
    Hi,

    This can be done in cpanel using redirection option.

    1)Click on the Redirects button under site management on
    the home page.
    2)Enter the address of the web page to move in the first
    field.
    3)Enter the redirection address in the second field.
    4)Choose Temporary or Permanent according to your need.
    5)Click on the Add button.

    Regards,

    Bright:)
     
  3. myrem

    myrem Well-Known Member

    Joined:
    Jul 14, 2002
    Messages:
    93
    Likes Received:
    0
    Trophy Points:
    6
    I think he's looking for a way to affect the displayed URL domain in the browser address bar. The redirect will go into an infinite loop if he has both domains pointed to the same public_html folder.

    Try this:

    PARK 'domain-name.com' onto 'domainname.com'

    In your .htaccess file in public_html
    Code:
    RewriteEngine On
    RewriteCond %{HTTP_HOST} !^[url]www.domainname.com[/url]$
    RewriteRule ^(.*)$ [url]http://www.domainname.com/[/url] [R,L]
    
    This will "rewrite" any domain name hitting your website which is NOT 'www.domainname.com' to 'www.domainname.com'
     
  4. Daemon1

    Daemon1 Well-Known Member

    Joined:
    Nov 26, 2003
    Messages:
    87
    Likes Received:
    0
    Trophy Points:
    6
    I figured out a better way, it in effect works like a meta refresh but because it's server side google spiders it correctly...

    <?php header("location: http://www.domaintoforwardto.com/"); ?>

    Done... Works like a charm! Cpanel needs real binded url forwarding... With all the bells and whistles they forgot the basics!
     
Loading...

Share This Page