Christopher Juckins

SysAdmin Tips, Tricks and other Software Tools

User Tools

Site Tools


force_https_ssl_by_directory_with_.htaccess

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

force_https_ssl_by_directory_with_.htaccess [2008/08/04 14:50] – created juckinsforce_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 
- 
-<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.1217875800.txt.gz · Last modified: 2008/08/04 14:50 by juckins