Christopher Juckins

SysAdmin Tips, Tricks and other Software Tools

User Tools

Site Tools


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
 +
 +<code>
 +RewriteEngine On
 +RewriteCond %{HTTPS} off
 +RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}
 +</code>
 +
 +-or-
 +
 +<code>
 +SSLRequireSSL
 +</code>
 +
 +then:
 +
 +<code>
 +service httpd restart
 +</code>
 +
  
force_https_ssl_by_directory_with_.htaccess.txt · Last modified: 2008/08/04 14:50 by juckins