• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
.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


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.