Trying to setup my site so that its on HTTPS AND includes the WWW in the URL.
After a while of searching I found a few posts that helped me redirect to https:
stackoverflow.com/questions/25527671/magento-https-on-all-website-urls-redirect-to-homepage
and then to redirect to get the 'www' added in I used:
RewriteCond %{HTTP_HOST} !^www\. RewriteRule ^(.*)$ https://www.%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
I ended up with everything working eventually! BUT here is where I think a problem lies. It may be me being niggley BUT when you check a URL now on my site (old redirect URL):
http://aloe-herbal.co.uk/categories/Bee-Hive-Products/pages/Contact-Us.html
it redirects fine BUT then using a 301 redirect checker:
redirect-checker.org/index.phpyou can clearly see that there is 2 301 redirects happening here.. I don't think that's ideal..
Initially this was happening 2-3 3 times SO as an example if I used the URL to check as:
aloe-herbal.co.uk/fitness-weight-management.html @ www.redirect-checker.org/index.phpit would give me the following:
CONGRATULATION. Everything seems to be fine. http://aloe-herbal.co.uk/fitness-weight-management.html 301 Moved Permanently http://www.aloe-herbal.co.uk/fitness-weight-management.html 301 Moved Permanently https://www.aloe-herbal.co.uk/fitness-weight-management.html 200 OK
I know it says its okay but I am concerned about the extra trip that its having to make..
So I decided top open a question. Well FIRSTLY thanks for a GREAT related questions feature. WOW gave me a fix straight away:
magento.stackexchange.com/questions/40400/magento-goes-first-the-http-then-redirects-to-https
Works like a charm now there is only 1 301 Moved Permanently listed :)
BUT again if you check: http://aloe-herbal.co.uk/categories/Bee-Hive-Products/pages/Contact-Us.html
you can see its there 2 times again... That's what I am trying to fix/avoid..
Can any experts help with this last part?