Welcome Guest, Not a member yet? Register   Sign In
.htaccess - redirect http to https exclude specific url
#1

How to redirect http to https exclude specific url?

[font=Monaco, Consolas, Courier, monospace]http://www.example.com/* => https://www.example.com/*

http://www.example.com/nonssl/* => http://www.example.com/nonssl/*[/font]


So I make .htaccess file following this:
Code:
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteCond %{REQUEST_URI} !^/nonssl/
RewriteRule .* https://%{HTTP_HOST}%{REQUEST_URI} [R,L]

But when I go to [font=Monaco, Consolas, Courier, monospace]http://www.example.com/nonssl/testfunc[/font], it goes to https://www.example.com/index.php/nonssl/testfunc.

Thanks in advance.
Reply




Theme © iAndrew 2016 - Forum software by © MyBB