Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

/index.php/checkout/onepage/ Redirect Loop After Enabling SSL
 
JonR
Jr. Member
 
Total Posts:  5
Joined:  2009-10-28
 

I am getting a redirection loop when my site tries to switch to secure. When I click Proceed to Checkout is when my magento site tries to switch to SSL (https://) and is not able.

Any Ideas?

Here are my secure URL settings:

Base URL:  https://sitename.com/

Base Link URL:  https://sitename.com/

Base Skin URL:  https://sitename.com/skin

Base Media URL:  https://sitename.com/media

Base JavaScript URL:  https://sitename.com/js

Use Secure URLs in Frontend:  Yes

Use Secure URLs in Admin:  No

 
Magento Community Magento Community
Magento Community
Magento Community
 
JonR
Jr. Member
 
Total Posts:  5
Joined:  2009-10-28
 

If I set “Use Secure URLs in frontend” to No. I can manually pull up /index.php/checkout/onepage/ without any problems. But when I set it to yes then I get the Redirection Loop error in firefox.

Any help would be really appreciated!

Thanks,
Jon

 
Magento Community Magento Community
Magento Community
Magento Community
 
JonR
Jr. Member
 
Total Posts:  5
Joined:  2009-10-28
 

Fixed the issue. My SSL deceleration in apache was not correct.

 
Magento Community Magento Community
Magento Community
Magento Community
 
bradeja
Jr. Member
 
Total Posts:  4
Joined:  2009-10-05
 

Hi JonR,

I’m having this exact same problem right now.  What did you change your SSL declaration to in Apache?  Any details would be much appreciated.

 
Magento Community Magento Community
Magento Community
Magento Community
 
dangu
Jr. Member
 
Total Posts:  5
Joined:  2009-12-09
 

same problem here - any help would be great

 
Magento Community Magento Community
Magento Community
Magento Community
 
evilgenius
Jr. Member
 
Total Posts:  1
Joined:  2009-01-03
 

Same Same here. I’m seeing Redirect loop for ssl pages. I’m using the Bluehost free shared SSL certificate.

 
Magento Community Magento Community
Magento Community
Magento Community
 
bradeja
Jr. Member
 
Total Posts:  4
Joined:  2009-10-05
 

It might have something to do with your php HTTPS setting.  Try adding the following code to the index.php file in the magento site root (don’t forget to put your domain where noted).

if(isset($_SERVER['HTTP_X_FORWARDED_HOST']) && $_SERVER['HTTP_X_FORWARDED_HOST'== 'YOUR DOMAIN HERE'{
    $_SERVER[
'HTTPS''on';
    
$_SERVER['SERVER_PORT'443;
}

This probably isn’t the “best practice” solution, but it worked for me.  You might want to do a phpinfo() command in a new php file and check to see if $_SERVER["HTTPS"] is set to “on” under “PHP variables” section.

 
Magento Community Magento Community
Magento Community
Magento Community
 
nwd37210
Jr. Member
 
Total Posts:  17
Joined:  2009-12-28
 

I’m having the same problem on webfaction hosting.

Any ideas?

I’m using a thawte.com certificate....

 
Magento Community Magento Community
Magento Community
Magento Community
 
usauggs
Jr. Member
 
Total Posts:  26
Joined:  2009-08-23
 

same problem, why jonr did not tell us what he did to get this solved? any body can help? appreciated!

we ask for help to save our own time, why do not share to save others time?

 
Magento Community Magento Community
Magento Community
Magento Community
 
Strattas
Jr. Member
 
Avatar
Total Posts:  19
Joined:  2008-12-07
California
 

I’ve been dealing with this redirect thing on a brand new server (Debian) with DirectAdmin and Magento 1.3.2.4 for over a week. I’ve tried everything in the posts on this forum as well as posts on a variety of blogs. Nothing worked.

I finally figured it out however.

When you use SSL and enable the settings in the back end of Magento - base urls and enable “Use SSL on front end” Magento uses the pivate_html folder as the “secured” folder. You can’t simply copy all of your files to this folder and expect it to work. This breaks the session, hence the reason for the redirect.

What you need to do is create a symbolic link from the private_html folder to the public_html folder. This tells the session to go ahead and stay where you are, use the same files and I’ll be happy, I’m secure, I get it. (At least this is what I think the folders would say if they could talk)

To create the symbolic link:

You’ll need to log onto SSH and navigate to your domains folder where your domain exists. Open the domain folder and rename the private_html folder (if it exists) to private_htmlbu or something like that.

Next execute this command:  ln -s public_html ./private_html

This creates a symbolic folder of the public_html folder.  Log back into Magento admin, setup the SSL base urls and say “Yes” to use secured connections on front end.  Your redirection blues should be behind you and you can move on to that next Magento issue you’re dealing with.  (And, if you’re not, you soon will be)

If you don’t know what SSH is or what it’s for it’s probably best you have your host do this. Just point them to this post and they’ll know what to do.

Good luck.

 
Magento Community Magento Community
Magento Community
Magento Community
 
HectorPN
Member
 
Total Posts:  74
Joined:  2010-03-21
Adelaide, Australia
 

I was having this issue on 1.4 and this worked for me, hope it saves someone else’s time:

Configuration > Web > (Scope set to Default Config) > Session Validation Settings > Use SID on Frontend > Yes

 
Magento Community Magento Community
Magento Community
Magento Community
 
Pixel Salsa
Jr. Member
 
Total Posts:  7
Joined:  2010-03-10
 

Hey - does anyone have a solid solution for this as i am pulling my hair out - the site is due to go live in 3 days and i can’t test the payment without this damned redirect loop.

Hosting is on webfusion shared

Please please please help someone

Dan

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top