force_https_ssl_by_directory_with_.htaccess
Differences
This shows you the differences between two versions of the page.
force_https_ssl_by_directory_with_.htaccess [2008/08/04 14:50] – created juckins | force_https_ssl_by_directory_with_.htaccess [2025/03/20 18:38] (current) – removed 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.1217875800.txt.gz · Last modified: 2008/08/04 14:50 by juckins