May 19, 2011

HTACCESS: Rewrite all HTTP request to HTTPS


RewriteCond %{HTTPS} !=on
RewriteRule .* https://%{SERVER_NAME}%{REQUEST_URI} [R,L]


Reference:
1 http://www.askapache.com/htaccess/ssl-example-usage-in-htaccess.html
2 http://joseph.randomnetworks.com/2004/07/22/redirect-to-ssl-using-apaches-htaccess/

No comments: