Forum

Thread tagged as: Problem, Configuration, Hosting

SSL Confused

Hi all

Im a little confused

i need to force SSL for a whole website and was going to use the htaccess

#RewriteEngine On
#RewriteRule ^(.*)$ https://mywebsite.org.uk/$1 [R=301,L]

but when i add the redirect i just get sent here https://mywebsite.org.uk/perch/core/runway/start.php

and displays 404 error

if i use the perch method i get ERR_TOO_MANY_REDIRECTS

my hosting provider has tried to help with no success

Can anyone help

Anthony Elleray

Anthony Elleray 2 points

  • 5 years ago

Did you follow the instructions here? If so, did you remove those lines from your .htaccess first? The lines you have there will create an infinite redirect loop, because you're telling the server to ALWAYS redirect to https, even if the original URL is already https.

yes ive removed all the perch SSL setup and just set it in htaccess

what settings do you use for ssl

If it helps, this is what we use ...

RewriteEngine On 
RewriteCond %{SERVER_PORT} 80 
RewriteRule ^(.*)$ https://www.mywebsite.com/$1 [R,L]

That just takes me to the 404 page again

Drew McLellan

Drew McLellan 2638 points
Perch Support

You might do better on somewhere like Stack Overflow for web server configuration questions.

This line works on all pages apart from the home page where i still get sent to https://mywebsite.org.uk/perch/core/runway/start.php

RewriteCond %{HTTP:X-Forwarded-Proto} !https

insted of

RewriteCond %{SERVER_PORT} 80