HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (http://www.howtoforge.com/forums/index.php)
-   General (http://www.howtoforge.com/forums/forumdisplay.php?f=15)
-   -   Force https on a directory (http://www.howtoforge.com/forums/showthread.php?t=13636)

TheMaximumWeasel 25th June 2007 06:59

Force https on a directory
 
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

TheMaximumWeasel 25th June 2007 07:24

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

that works fine


All times are GMT +2. The time now is 03:54.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.