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

problem with ssl-proxy and mod_rewrite
 
teddy86
Jr. Member
 
Total Posts:  11
Joined:  2008-03-08
 

hi folks,

i installed m successfully, but if i wanna open ssl-secured links like !My Account” or “Login” the site won’t load and it says redirection faild because the redirectionit won’t ever finish.

mod_rewrite works fine with a normal url like http://www.myshop.com/checkout/cart/ but if i try a ssl-secured link like https://sslsite.com/myshop.com/customer/account/ the above mentioned error occures.

https://sslsite.com is an ssl-Proxy that serves my site myshop.com.

this is my .htaccess file:

DirectoryIndex index.php

RewriteEngine on

RewriteBase 
/

RewriteCond %{REQUEST_URI} !^/media/
RewriteCond %{REQUEST_URI} !^/skin/
RewriteCond %{REQUEST_URI} !^/js/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond 
%{REQUEST_FILENAME} !-d
RewriteCond 
%{REQUEST_FILENAME} !-l

RewriteRule 
.* index.php

what went wrong?! how do i fix the problem?

thanks
ted

 
Magento Community Magento Community
Magento Community
Magento Community
 
Moshe
Magento Team
 
Avatar
Total Posts:  1770
Joined:  2007-08-07
Los Angeles
 

In my opinion this problem is outside of Magento scope.

Please try different SSL link like https://myshop.com/ or ask your hosting provider for correct link.

 
Magento Community Magento Community
Magento Community
Magento Community
 
teddy86
Jr. Member
 
Total Posts:  11
Joined:  2008-03-08
 

thanks for your support!

well, i don’t really think so. for example i dont have any problems to open https://sslsites.com/myshop.com/checkout/cart/ (this link is normally not ssl-secured). therefore mod_rewrite seems to work fine with the ssl-proxy in use.

only if i try to open a link which is delivered through an ssl connection by default for example https://sslsites.com/myshop.com/customer/account/ the error occurs…

any suggestions?

greetz
ted

 
Magento Community Magento Community
Magento Community
Magento Community
 
Moshe
Magento Team
 
Avatar
Total Posts:  1770
Joined:  2007-08-07
Los Angeles
 

It is really hard to figure out the problem with hypothetical urls, you can send me PM with the real URLs so i can take a look

 
Magento Community Magento Community
Magento Community
Magento Community
 
teddy86
Jr. Member
 
Total Posts:  11
Joined:  2008-03-08
 

The following error message is shown by safari:

Safari can’t open the page.
Too many redirects occurred trying to open “https://sslsites.com/myshop.com/customer/account/”. This might occur if you open a page that is redirected to open another page which then is redirected to open the original page.

it seems to be, that https://sslsites.com/myshop.com/customer/account/ redirects to itself with the above mentioned .htaccess file…
this does only happen if i try to open a page wich is delivered via ssl by default.

any ideas to fix the problem?

greetz
ted

 
Magento Community Magento Community
Magento Community
Magento Community
 
Moshe
Magento Team
 
Avatar
Total Posts:  1770
Joined:  2007-08-07
Los Angeles
 

Oh i see, $_SERVER environment on the web server shows that connection is unsecure, although the proxy makes it appear secure for the browser.

We did not test this configuration, will need to setup and check what can be done.

 
Magento Community Magento Community
Magento Community
Magento Community
 
teddy86
Jr. Member
 
Total Posts:  11
Joined:  2008-03-08
 

by the way: the same problem happens if i try to open https://myshop.com/customer/account/ directly without any ssl-proxy…

 
Magento Community Magento Community
Magento Community
Magento Community
 
teddy86
Jr. Member
 
Total Posts:  11
Joined:  2008-03-08
 

i would like to disable ssl just to get it working for now. therefore i changed the settings web/secure/use_in_frontend and web/secure/use_in_adminhtml to 0 and deleted the string in web/secure/base_url (table core_config_data)

the frontend and backend is still deliverd via ssl..
how can i change this?

ted

 
Magento Community Magento Community
Magento Community
Magento Community
 
Moshe
Magento Team
 
Avatar
Total Posts:  1770
Joined:  2007-08-07
Los Angeles
 

cleaned the cache? (delete var/cache)

 
Magento Community Magento Community
Magento Community
Magento Community
 
teddy86
Jr. Member
 
Total Posts:  11
Joined:  2008-03-08
 

i deleted all subfolders of var/cache -> worked fine.
but now i dont see any css layout anymore. just the unstyled rawoutput. how do i fix this now?

 
Magento Community Magento Community
Magento Community
Magento Community
 
Moshe
Magento Team
 
Avatar
Total Posts:  1770
Joined:  2007-08-07
Los Angeles
 

that might have been because you deleted the string in web/secure/base_url

run this statement in your database:

delete from `core_config_datawhere path like 'web/%';
 
Magento Community Magento Community
Magento Community
Magento Community
 
teddy86
Jr. Member
 
Total Posts:  11
Joined:  2008-03-08
 

ok, that worked fine, thanks.
now i can’t log in at myshop.com/admin, although there is an entry with the correct user/password in admin_user…

 
Magento Community Magento Community
Magento Community
Magento Community
 
teddy86
Jr. Member
 
Total Posts:  11
Joined:  2008-03-08
 

i had to generate a new md5 password. but it was exactly the same password i used during the setup of m. why was it different? encription key didn#t work properly?

 
Magento Community Magento Community
Magento Community
Magento Community
 
Moshe
Magento Team
 
Avatar
Total Posts:  1770
Joined:  2007-08-07
Los Angeles
 

Currently no encryption key is involved in admin password hashing ... just simple md5, so i’m at loss why it didn’t work for you

 
Magento Community Magento Community
Magento Community
Magento Community
 
flowstack
Sr. Member
 
Avatar
Total Posts:  159
Joined:  2008-01-30
London, United Kingdom
 

Just to let you know that I am having this exact same SSL problem with shared SSL on 1&1;servers.

This used to happen with osCommerce and the culprit was the line:

$request_type = (getenv('HTTPS') == 'on') ? 'SSL' 'NONSSL'

This failed to recognise SSL on some servers.

The hack was to replace this line with something like:

$request_type = (getenv('HTTP_X_FORWARDED_HOST') == 'sslrelay.com') ? 'SSL' 'NONSSL';

or

$request_type = (eregi ($HTTP_HOSTHTTPS_SERVER)) ? 'SSL' 'NONSSL';

I haven’t fully investigated the Magento code yet, but it’s likely the same thing is happening.

 
Magento Community Magento Community
Magento Community
Magento Community
 
flowstack
Sr. Member
 
Avatar
Total Posts:  159
Joined:  2008-01-30
London, United Kingdom
 

Moshe, your comment about $_SERVER variable flipped a switch in my mind and I have come up with a hack to fix this problem. So thank you.

It is detailed here:

http://www.magentocommerce.com/boards/viewthread/4320/

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