force_https_ssl_by_directory_with_.htaccess
no way to compare when less than two revisions
Differences
This shows you the differences between two versions of the page.
— | force_https_ssl_by_directory_with_.htaccess [2008/08/04 14:50] (current) – created juckins | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | cd to directory you want to protect. | ||
+ | |||
+ | vi .htaccess | ||
+ | |||
+ | < | ||
+ | RewriteEngine On | ||
+ | RewriteCond %{HTTPS} off | ||
+ | RewriteRule (.*) https:// | ||
+ | </ | ||
+ | |||
+ | -or- | ||
+ | |||
+ | < | ||
+ | SSLRequireSSL | ||
+ | </ | ||
+ | |||
+ | then: | ||
+ | |||
+ | < | ||
+ | service httpd restart | ||
+ | </ | ||
+ | |||
force_https_ssl_by_directory_with_.htaccess.txt · Last modified: 2008/08/04 14:50 by juckins