Hi, i know this has been covered before so my apologies if i have missed the answer on other posts but im stuck.
I am trying to get all my pages to https:// and have tried many solutions previously posted
This is the current one, but i have honestly been through all variations -
RewriteCond %{HTTP_HOST} catering-spareparts\.co\.uk [NC]
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://www.catering-spareparts.co.uk/$1 [R=301,L]
Also i have altered the config files to represent what all the other posts have suggested.
I either get no result or err too many redirects..... seems to be no in-between.
I have got to the point where i am going round in circles, so any help would be much appreciated.....
Thanks.
Try this:
Also check that you don't have any other rewrites in your .htaccess file(s) that are still going to http: -- that can put you in a loop with "too many redirects".
Code: Select all
RewriteEngine On
RewriteCond %{HTTP_HOST} !^www\. [NC,OR]
RewriteCond %{HTTPS} !on
RewriteRule ^(.*)$ https://www.catering-spareparts.co.uk/$1 [R=301,L]
Thanks for the quick response.
Unfortunately the code you supplied didn't work.
I have searched and can only find one other htaccess file -
<Files *.*>
Order Deny,Allow
Deny from all
</Files>
Would it be possible to pm you the htaccess file and maybe you could tell me if I'm missing anything glaringly obvious?
The problem i have is at this stage i think it may be some sort of err on the servers part but unless i can prove it they aren't going to admit to it - I had a similar issue with getting export/import to work which they said was to do with my end and after a bit of research i manage to convince them it was there install of php, which it was!
Thanks.
Unfortunately the code you supplied didn't work.
I have searched and can only find one other htaccess file -
<Files *.*>
Order Deny,Allow
Deny from all
</Files>
Would it be possible to pm you the htaccess file and maybe you could tell me if I'm missing anything glaringly obvious?
The problem i have is at this stage i think it may be some sort of err on the servers part but unless i can prove it they aren't going to admit to it - I had a similar issue with getting export/import to work which they said was to do with my end and after a bit of research i manage to convince them it was there install of php, which it was!
Thanks.
Sure, I could take a look at your .htaccess. Some things to look at first:
- Some hosts have weird setups where giving a valid path makes the server skip over higher level directories, and go directly to the given one. This would miss the /.htaccess, although I can't see it causing a "too many redirects" loop.
- There can be oddities in SSL support where %{HTTPS} doesn't work as expected (return on or off), and you'll need to use %{SERVER_PORT} (80 is http).
Who is online
Users browsing this forum: No registered users and 58 guests