
November 1st, 2005, 11:21 PM
|
 |
mod_dev_shed
|
|
Join Date: Sep 2002
Location: Atlanta, GA
|
|
|
http://domain.com -> https://domain.com (forcing "https")
Code:
RewriteCond %{SERVER_PORT} !^443$
RewriteRule ^(.*)$ https://%{HTTP_HOST}/$1 [R=301,L]
Code:
http://domain.com/foo.html -> https://domain.com/foo.html
This rule set externally redirects all requests to the same request on the current domain, but over a secure protocol / connection.
Related Threads: Redirect to secure URL, Force HTTPS on secure.domain.com
Last edited by jharnois : July 20th, 2007 at 07:26 PM.
Reason: Added related thread.
|