Force https on a directory

Discussion in 'General' started by TheMaximumWeasel, Jun 25, 2007.

  1. TheMaximumWeasel

    TheMaximumWeasel New Member

    Is it possible to force https on a directory for example if a user tries to access that directory via http it auto redirects to https?

    Max
     
  2. TheMaximumWeasel

    TheMaximumWeasel New Member

    RewriteEngine on
    RewriteCond %{HTTPS} off
    RewriteCond %{REQUEST_URI} ^/mysecuredirectory/.*$
    RewriteRule ^/(.+)$ https://www.mydomain.com/$1 [R]

    that works fine
     

Share This Page