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!

Need help with a simple redirect.

Discussion in 'General Discussion' started by jols, Oct 16, 2006.

  1. jols

    jols Well-Known Member

    Joined:
    Mar 13, 2004
    Messages:
    1,111
    Likes Received:
    3
    Trophy Points:
    168
    I need to redirect any traffic using the secure prefix "https" to another URL in the same site that also uses the secure prefix.

    I have tried putting up the following .htaccess file but it does not work. Does anyone have any ideas here? Thanks very much.

    RewriteEngine On
    Options +FollowSymlinks
    RewriteBase /
    RewriteCond %{HTTP_HOST} https://([a-z0-9-]+\.)*domain.com/ [NC]
    RewriteRule /* https://domain.com/store [L,R]
     
  2. jols

    jols Well-Known Member

    Joined:
    Mar 13, 2004
    Messages:
    1,111
    Likes Received:
    3
    Trophy Points:
    168
    Finally figured this one out. For anyone interested, it goes like this:

    RewriteEngine on
    RewriteCond %{HTTP_HOST} ^store\.domain\.com
    RewriteRule ^(.*)$ https://www.domain.com/$1 [R=permanent,L]
     
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