Apache redirect http to https too many redirects errors -


here rewrite rule generated certbot.

rewriteengine on rewritecond %{server_name} =www.mysite.com [or] rewritecond %{server_name} =mysite.com rewriterule ^ https://%{server_name}%{request_uri} [end,ne,r=permanent] 

it not work , browser show many redirects erros.

rewriteengine on rewritecond %{http_host} !^www\. [nc] rewriterule ^(.*)$ https://www.%{http_host}/$1 [r=301,l] rewritecond %{request_filename} !-d rewritecond %{request_filename} !-f rewriterule ^/$    index.php    [l] 

use code redirect domain http://www.. , avoid many redirection


Comments

Popular posts from this blog

ubuntu - PHP script to find files of certain extensions in a directory, returns populated array when run in browser, but empty array when run from terminal -

php - How can i create a user dashboard -

javascript - How to detect toggling of the fullscreen-toolbar in jQuery Mobile? -