I'm sure this is simple, but I can't quite work it out.
My Magento website has several (duplicate) URL's:
http://www.example.com
http://www.example.com/index.php/
https://www.example.com/
https://www.example.com/index.php
I want them all linking to the https version of example.com
I tried adding the following in my htaccess root file:
RewriteEngine On
RewriteCond %{HTTPS} !^on$
RewriteRule (.*) https://www.example.com/$1 [R,L]
RewriteCond %{THE_REQUEST} ^.*/index.php
RewriteRule ^(.*)index.php$ https://www.example.com/$1 [R=301,L]
but it doesn't work (it means I can no longer access my www.example.com/admin site). Any ideas? I'm sure this must be a common thing with Magento?