with my WordPress-Blog, I switch to https. Therefore, I have add the following code to my .htaccess-File. My Problem now is, that I get the issue "Too many Redirects". Thank you for your tips!
Domain is a Subdomain:
# Begin Force SSL
RewriteEngine On
RewriteCond %{SERVER_PORT} !^443$
RewriteRule (.*) https://%{HTTP_HOST}/$1 [R=301,L]
# End Force SSL
# 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
Try changing your first three lines to:
RewriteEngine On
RewriteCond %{HTTPS} !=on
RewriteRule ^/?(.*) https://%{SERVER_NAME}/$1 [R=301,L]
I believe, that unless you attempted to go to https://en.example.com/:443 then {SERVER_PORT} will never return 443.
Is there a publicly-accessible URL to view your site's behavior?
Oh there is still a problem: Currently I´m also able to open the URL with http only.
So, it isn't forwarding you to https?
sorry for the late response. Now it works! I think, it was a server cache issue.
What if I get the
ERR_TOO_MANY_REDIRECTS
error? How do I fix that?