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!

cPanel Redirect rule escape question

Discussion in 'EasyApache' started by ottdev, Oct 28, 2018.

  1. ottdev

    ottdev Well-Known Member

    Joined:
    Oct 1, 2013
    Messages:
    119
    Likes Received:
    4
    Trophy Points:
    18
    cPanel Access Level:
    Root Administrator
    When user creates an add-on domain, and redirects it in cPanel, you write the following to .htaccess:
    RewriteCond %{HTTP_HOST} ^mydomain\.tld$ [OR]
    RewriteCond %{HTTP_HOST} ^www\.mydomain\.tld$
    RewriteRule ^/?$ "https\:\/\/www\.myotherdomain\.tld\/company\/about\-company\-information\/" [R=301,L]

    I know it works anyway in this case, but WHY are you escaping the right hand side in the rule ?
     
  2. cPanelMichael

    cPanelMichael Technical Support Community Manager Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    47,272
    Likes Received:
    2,154
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    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