Redirect from http to https
-
My site is all setup to work https: so I need to redirect all http to https.
I’ve searched for .htaccess code to do the job, and everyone seems pretty much agreed that the below (although there are variatrions around) will do the job. However it is producing the “too many redirects” error.
The thing is: without this addition to .htaccess, my home page redirects to https but no other page do. With this code, all pages give too many redirects. Using wheregoes.com to trace the redirects, without this extra .htacces code there are no redirects on http or https pages (except the home page). If there are no redirects on https pages now, the cause of it must be in the code below. But this is what everyone recommends, so I don’t understand. I know little of .htacces syntax, unfortunately.
Any insights very much appreciated.
# BEGIN HTTPS Redirection Plugin
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{SERVER_PORT} !^443$
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
</IfModule>
# END HTTPS Redirection Plugin#BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ – [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule># END WordPress
The page I need help with: [log in to see the link]
- The topic ‘Redirect from http to https’ is closed to new replies.