cancel
Showing results for 
Search instead for 
Did you mean: 

HTTP to HTTPS

HTTP to HTTPS

Hello,

 

We are trying to get https when buyer checking out items.

 

More specifically, we would like URLs that associated with checkout have https.

Eg.
1) http://idfr.com/checkout/cart/
2) http://idfr.com/checkout/onepage/

 

As for now, we can see the ssl green bar on https://idfr.com/checkout/cart/ , yet the page have error message as below. Please advise the correct code in .htaccess.
Not Found
The requested URL /checkout/cart/ was not found on this server.
Apache/2.4.7 (Ubuntu) Server at idfr.com Port 443

 

 

Below is part of the mod_rewrite we have in .htaccess.

############################################
   Options +FollowSymLinks
   RewriteEngine on
   RewriteCond %{HTTPS} off
   RewriteRule ^checkout\/cart\/$ https://idfr.com/checkout/cart/ [R=301,L]

############################################

 

10 REPLIES

Re: HTTP to HTTPS

Hi Soniahsieh,

 

You try here: http://stackoverflow.com/questions/9886625/magento-onepage-checkout-and-ssl-https

And go to Magento Admin > Configuration > Web :

+The {{base_url}} should be changed to http://www.domain.com

+The {{secure_base_url}} should be changed to https://www.domain.com

 

See my screenshot here: http://www.screencast.com/users/MrKhoa/folders/Screen%20Shoot/media/cfb9b1a9-66b2-48fe-a68c-c1eccd7c...

 

Hope this works for you.

 

Problem solved? Click Accept as Solution!

Re: HTTP to HTTPS

Hi MrKhoa99,

 

I modified our .htaccess rewrite and the setting to https in the admin configuration. But, the issue is still persist.(https://idfr.com/checkout/onepage/)

Not Found

The requested URL /checkout/onepage/ was not found on this server.

Apache/2.4.7 (Ubuntu) Server at idfr.com Port 443

 

 

Below is our current .htaccess rewrite.

 

   Options +FollowSymLinks
   RewriteEngine on
   RewriteCond %{REQUEST_URI} checkout\/onepage
   RewriteCond %{HTTPS} off
   RewriteRule ^(.*)$ https://%{HTTP_HOST}/$1 [R=301,L]

 

Re: HTTP to HTTPS

Why are you using .htaccess rewrite? You should just set your Secure URL to HTTPS in your Magento Admin and it will work properly. 

James Lee | Moderator • Magento Master
See My Recommended Magento Hosting & Security Tips

Re: HTTP to HTTPS

I think I have messed up things here and realized it's not a recommended way to do it. After that, I was trying to modified the 000-default.conf file as well(in sites-enabled) and still not successful.. Any help would be greatly appreciated. I can provide those content if you need to see them.

 

 

In addition, I just commented out the lines in the .htaccess, and all the product pages are Not found on the server. 

When I clicked on the menu Exterior>Bull Bar/A-Bar, the browser returns:

The requested URL /exterior/bumper-guards/bull-bar-a-barhtml was not found on this server.

Apache/2.4.7 (Ubuntu) Server at idfr.com Port 80

 

Re: HTTP to HTTPS

I think you should revert all changes you made at the server level and use the Magento default .htaccess file. 

 

To enable HTTPS, just go to Magento Admin --> System --> Configuration --> Web --> Secure and:-

  1. Change the Base URL to HTTPS. 
  2. Enable Secure URLs in Frontend
  3. Enable Secure URLs in Admin

 

Once you have done this, your Checkout page will use HTTPS if you've added any item to your shopping cart. 

James Lee | Moderator • Magento Master
See My Recommended Magento Hosting & Security Tips

Re: HTTP to HTTPS

Now I can not even view my product pages..

I already enabled HTTPS in Magento Admin and I believe I have reverted all changes I made before.

 

000-default.conf (sites-enabled)

http://pastebin.com/NDnTMPgW

 

.htaccess

http://pastebin.com/MBAumqgW

 

Did I do anything wrong in above two files?

Re: HTTP to HTTPS

I'm not sure what you did to your .conf file but if you did not revert everything back properly, you may need to either restore it from backup or have a qualified system administrator to look into it for you. 

 

Before you do that, try replacing your .htaccess file with the default .htaccess by Magento and see if it works. 

James Lee | Moderator • Magento Master
See My Recommended Magento Hosting & Security Tips

Re: HTTP to HTTPS

To replace the .htaccess will be my last way to do if I can use other ways to fix it.

 

I found I'll need to delete the comment for "RewriteEngine on" to be able to view product pages and the admin login page.

 

After add an item to the cart, the one page check out is not working.

https://idfr.com/checkout/onepage/

 

Not Found

The requested URL /checkout/onepage/ was not found on this server.


Apache/2.4.7 (Ubuntu) Server at idfr.com Port 443

Re: HTTP to HTTPS

Hi,

 

My problem is not completely solved. I can see the checkout page with https, but the shopping cart is not.

http://idfr.com/index.php/checkout/cart/

 

The last action I did is an advice from others to disable the URL rewrites to add index.php to all our URLs. So I set "Use Web Server Rewrites" to "No", then my checkout page worked again and with https. Since it's bad for SEO, I'm also wondering what better solution can replace this method.