Home Htaccess rules http to https redirecting too many times
Reply: 0

Htaccess rules http to https redirecting too many times

Maha Dev
1#
Maha Dev Published in 2017-11-10 06:59:48Z

I am using simple htaccess rules to redirect http to https but it breaks the page and shows an error "Redirecting too many times" . Here is my code

Approach -1

RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

Approach -2

RewriteEngine On
RewriteCond %{HTTPS} !on
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

I tried both approaches but its not working. Here is the error i get:

You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.302907 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO