redirected too many times when i try to force https for all urls

by Amit   Last Updated May 13, 2019 04:04 AM

I want to redirect all website urls to https. i used below code to do so. My website is build up using simple php. i don't use any opensource framework or cms.

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

but, that's not working and throws below error.

page not responding. redirected too many times.



Related Questions


Updated October 08, 2018 01:04 AM

Updated August 22, 2018 10:04 AM

Updated May 14, 2017 07:04 AM

Updated August 22, 2018 06:04 AM

Updated January 19, 2018 04:04 AM