2
votes

I want to redirect my entire pages on https on my magento 1.7.0.2 website. On the admin under System >> Configuration >> Web, under the unsecure tab I set the base url as http://www.xyz.com and under the secure tab its https://www.xyz.com. Also i have set the below field as :

Use Secure URLs in Frontend : Yes Use Secure URLs in Admin : No Offloader header : SSL_OFFLOADED.

I am not sure whether i need to add any extra code in .htaccess file or not. But by these, still my shows were open with http not https.

And also When i set https under the base url(unsecure), then it working fine. But it redirect to the homepage if we try to open any product page with http.

So please advise if someone can help me out.

3

3 Answers

1
votes

It depends on the page you want to make secure. By default Magento redirects to secure only some pages. The ones that required user information (register, login, checkout, contact). If you want to add a custom page read the answers in this question maybe they help.
If you want all the pages to be on https (even if I don't see a point in this) you can set, like you did, the unsecure url in config to https://www.xyz.com. and under the same config section (Web) under Url Options set Auto-redirect to Base URL to No. Clear the cache and give it an other try.

1
votes

You could also just set unsecure base_url to the HTTPs url

0
votes

Please follow these below steps :

1- Make sure System > Configuration > Web > url_options > "Auto-redirect to Base URL = No". It was set to "yes", and causing the problem.

2- Put below code in .htaccess file.

RewriteCond %{HTTP:X-Forwarded-Proto} !https
RewriteCond %{HTTPS} off
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301,NE]