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!

Redirect to secure

Discussion in 'General Discussion' started by logikstudios, Apr 22, 2007.

  1. logikstudios

    logikstudios Well-Known Member

    Joined:
    Nov 2, 2006
    Messages:
    158
    Likes Received:
    0
    Trophy Points:
    166
    Hi. In Cpanel, if i goto the redirect tab. It will allow me to redirect as normal. However it will not let me redirect to a secure path on the site such as https://yourdomain.com/files/thisfile.php

    Is there a way around this?

    THanks,
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  2. kingjj

    kingjj Registered

    Joined:
    Apr 16, 2007
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    151
    You could always try adding this to a .htaccess in the directory which you want secured:

    PHP:
    <IfModule mod_rewrite.c>
    RewriteEngine on
    RewriteCond 
    %{SERVER_PORT} !443$
    RewriteRule ^(.*) https://%{SERVER_NAME}/$1 [R,L]
    </IfModule>
    This will re-write all accesses in that directory ad subsequent directories to your https. You will need mod_rewrite installed.
     
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