Rewrite to https
October 8th, 2010 by fapg
If you want to rewrite a URL to https in the same virtualhost that you run http, you can add the flag RewriteCond %{HTTPS} !=on, like this:
RewriteEngine On
RewriteCond %{HTTPS} !=on
RewriteRule ^(/test)$ https://%{SERVER_NAME}$1 [R,L]
This entry was posted on Friday, October 8th, 2010 at %I:%M %p and is filed under apache, linux, network. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.