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?

http://www.example.com/* => https://www.example.com/*

http://www.example.com/nonssl/* => http://www.example.com/nonssl/*


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 http://www.example.com/nonssl/testfunc, it goes to https://www.example.com/index.php/nonssl/testfunc.

Thanks in advance.
Reply




Theme © iAndrew 2016 - Forum software by © MyBB