Redirect http to https with a condition - TechRepublic
Question
August 13, 2009 at 08:16 AM
sesblue

Redirect http to https with a condition

by sesblue . Updated 16 years, 11 months ago

Hello,
I am new at this, but I have been trying to redirect http request to my web server to https. The address is http://myweb.com which using (in .htaccess)
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule (.*) https://myweb.com/ redirects well all request to https.
However I have other requests to http://myweb.com/storage that get redirected to https://myweb.com (instead of https://myweb.com/storage) which I know is due to the above Redirect statements. Can anyone help in defining the right condition statements that can help me redirect http requests to the right https page.
Thanks.

This discussion is locked

All Comments