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

To everyone with 1&1;shared SSL problems [QUICK FIX AVAILABLE]
 
Federico Vezzoli
Jr. Member
 
Total Posts:  25
Joined:  2009-07-23
 

Hi,
i have the same problem, but both of the tips up there don’t work for me.
i’m running magento on mamp pro on my mac, on a virtual host called prova.com
so the path of magento is http://prova.com/magento
i want the https path to be https://prova.com/magento
but with that i take a 404 error.
i’ve tried to change both the htaccess and the path in the backend but nothing.
i’ve tried also to make a link to the root folder like ln -s securemagento magento but nothing again,
i get a internal server error for the loop on the rewritebase otherwise i still get the 404.
any help?

 
Magento Community Magento Community
Magento Community
Magento Community
 
mrx9
Jr. Member
 
Total Posts:  8
Joined:  2009-07-12
 

I have tried to access both of these sites and neither work.
Have you tried asking your hosting company for any advice.
Do they support other magento shops?
Not sure what else to suggest - sorry.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Federico Vezzoli
Jr. Member
 
Total Posts:  25
Joined:  2009-07-23
 

no, the domain prova.com is a virtualhost that i setup only on my local machine.
as i said before i’m running magento on my mac with mamp pro.

 
Magento Community Magento Community
Magento Community
Magento Community
 
glanum
Jr. Member
 
Avatar
Total Posts:  18
Joined:  2008-06-09
Avignon, France
 

Hi,
we just installed Magento 1.3.2.4 and this hasn’t been addressed yet but we have fixed it permanently. In essence we just wanted :
* http://ourdomain.com to use a particular RewriteBase, in subfolder ‘magento’, that is from the root.
* But our shared SSL https://ourhost.com/ourfolder to RewriteBase to subfolder ’ourfolder/magento’

The difference ? unlike our main domain, our shared SSL is provided from a subdirectory, not from the root of the domain

==> Well, it all happens in the .htaccess at the root of our domain (which is a duplicate of the one provided with magento in the ‘magento’ folder). We wrote a different RewriteRule based on the following condition RewriteCond: is request coming from HTTP or HTTPS?

This comes right after the:
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]

Here is what we added for our “IF REQUEST IS NOT HTTPS”:
RewriteCond %{HTTPS} !=on

Then we have the regular and original:
RewriteCond %{REQUEST_URI} !^/(media|skin|js)/
---- blah blah blah ----
RewriteRule .* ourmagentofolder/index.php [L]

Notice how we have our magento folder inserted up there, since we installed it in a subfolder. This comes INSTEAD of having RewriteBase /ourmagentofolder. Don’t use both! Our own just has a slash: ”RewriteBase /”.

And then the ‘ELSE IF’ goes right after it:
We added:
RewriteCond %{HTTPS} =on
RewriteCond %{REQUEST_URI} !^/(media|skin|js)/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-l
RewriteRule .* sharedsslfolder/index.php [L]

Which is exactly the same CONDITIONS except for the very first line of course and the very last.
Notice, we placed the correct name for our Shared SSL Folder before looking for index.php.

That’s it, now we have both URL REWRITE on, and the proper folder rewrite differentiated for http and https
My hat to Varien, despite this little omission, Magento is really great.

David.

 
Magento Community Magento Community
Magento Community
Magento Community
 
ambimax
Jr. Member
 
Avatar
Total Posts:  17
Joined:  2008-11-06
Saarbrücken, Germany
 

Well, an other short solution. For all those who do not want to change magento core files.

Just edit your index.php file and paste the following right before Mage::run();

if(isset($_SERVER['HTTP_X_FORWARDED_HOST']) && $_SERVER['HTTP_X_FORWARDED_HOST'== 'sslserver.de'{
    $_SERVER[
'HTTPS''on';
    
$_SERVER['SERVER_PORT'443;
}
Please edit “sslserver.de” to your server.

Hope it helps
Tobias

 
Magento Community Magento Community
Magento Community
Magento Community
 
FireWire2
Jr. Member
 
Total Posts:  9
Joined:  2009-05-31
 

David

I try you solution, but it does not work yet..

Here is what I mod in my htaccess.
Note my URL infor.
base URL: http://www.mysite.com/store
share secure URL: https://www.securesever1/~account/store

<IfModule mod_rewrite.c>

############################################
## enable rewrites

    
Options +FollowSymLinks
    RewriteEngine on

############################################
## you can put here your magento root folder
## path relative to web root

    
RewriteBase /

############################################
## workaround for HTTP authorization
## in CGI environment

    
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]

############################################
## always send 404 on missing files in these folders

    
RewriteCond %{HTTPS} !=on 
    RewriteCond 
%{REQUEST_URI} !^/(media|skin|js)/
    
RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond 
%{REQUEST_FILENAME} !-d
    RewriteCond 
%{REQUEST_FILENAME} !-l
    RewriteRule 
.* store/index.php [L]

    RewriteCond 
%{HTTPS} =on 
    RewriteCond 
%{REQUEST_URI} !^/(media|skin|js)/
    
RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond 
%{REQUEST_FILENAME} !-d
    RewriteCond 
%{REQUEST_FILENAME} !-l
    RewriteRule 
.* ~account/store/index.php [L]



</IfModule>

If you could please see what did i do wrong in the .htaccess.

TIA

 
Magento Community Magento Community
Magento Community
Magento Community
 
glanum
Jr. Member
 
Avatar
Total Posts:  18
Joined:  2008-06-09
Avignon, France
 

Hey Sam,

The very last line in your HTACCCESS doesn’t conform to my suggestion on my previous post.
it should be:

RewriteRule .* ~account/index.php [L]

Also, you say it doesnt work yet, but you don’t provide any information as to what works, what doesn’t, and what you get that makes you think things don’t work… blank pages ? loops ? error 500 ? home page for http but 404 on https ?.... be precise !

So anywyas, try that first and let us know. Hope that works smile

Cheers!

 
Magento Community Magento Community
Magento Community
Magento Community
 
FireWire2
Jr. Member
 
Total Posts:  9
Joined:  2009-05-31
 

David

Thank you for your help
Your solution not 100% work for me.

Unsercure page works

but whenever we access share SSL i got:
******
Not Found (404)

The requested URL /~datopt5/store/checkout/onepage/?..... was not found on this server.
**********

But thank to you i was able to make it work. I hope this will work for other too
Here is what I did:
My site info:

Unsure : http://www.datoptic.com/store
Sercure: https://secure79.inmotionhosting.com/~datopt5/store/

Here is what I did:

Back end:

under Configuration/Web
Search Engines Optimization
- Use Web Server Rewrites: YES

Unsecure
- Base URL:  http://www.datoptic.com/store/
... the rest does not change

Secure
- Base URL:  https://secure79.inmotionhosting.com/~datopt5/store/
- Base Link URL:  https://secure79.inmotionhosting.com/~datopt5/store/index.php/
... the rest does not change

note: index.php one with it and other without

htaccess file

change:

RewriteBase /
....
RewriteRule .* store/index.php [L]

Now

a product page will be like:
http://www.datoptic.com/store/storage/esata-sata-enclosure.html
but when check-out with share SSL:
https://secure79.inmotionhosting.com/~datopt5/store/index.php/checkout/onepage/....

 
Magento Community Magento Community
Magento Community
Magento Community
 
latinostar
Sr. Member
 
Total Posts:  99
Joined:  2009-09-10
 
vesvello - 14 October 2008 04:30 PM

I have ver 1.6 with 1and1 ssl share and it works for me. But I get this problem:

I have 2 store views. One english and one spanish....

The problem is when it redirects to ssl server, only accepts the spanish language because it is the default store view.

Any ideas?

http://www.publicidadporcelana.es

Hello Vesvello,

i have the same Problem. Did you find any solution?
SSL can’t handle storeviews.

if i only use the default storeview ssl works great, but if i surf to the ssl-sites with another storeview it doesn’t work and jumps to the default store.

sorry my english is not the best, i hope u understood grin

greets Ralf

 
Magento Community Magento Community
Magento Community
Magento Community
 
kneemahp
Sr. Member
 
Total Posts:  116
Joined:  2008-08-07
 

I’m using westhost as my hosting company.

i have upgraded to magento 1.4 and now my shared ssl doesn’t work. whenever i go to a secure page i get “The page isn’t redirecting properly”.

the steps in the beginning of this post don’t match up anymore with 1.4.

can anyone please help me?

 
Magento Community Magento Community
Magento Community
Magento Community
 
Finn
Member
 
Total Posts:  75
Joined:  2008-12-03
Finland & The Netherlands
 

Hi,

I stumbled upon this thread looking for a solution to an infinite redirect loop when opening the https part of a Magento frontend.

There seem to be some different solutions out there and I’d like to add another one.

My problem had it’s origin in the Apache config. When placing a test.php file in the document root and letting it print my $_SERVER vars it showed that the SERVER_PORT was still 80, not the expected 443, even though my url said httpS://myshop.com. If that’s the case, check your apache settings for the site and make sure all SSL directives are there and correct. After doing so I got the much wanted 443 and everything works properly!

 
Magento Community Magento Community
Magento Community
Magento Community
 
fabstr
Jr. Member
 
Total Posts:  24
Joined:  2010-03-22
 

Hey,
i tried the solutions posted here but none worked for me…

If i add these lines to my index.php i am stuck in a redirect loop

if(isset($_SERVER['HTTP_X_FORWARDED_HOST']) && $_SERVER['HTTP_X_FORWARDED_HOST'== 'ssl.kundenserver.de'{
    $_SERVER[
'HTTPS'='on';
    
$_SERVER['SERVER_PORT'443;
}

can anyone help me please

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

I\\\’m desperate for a fix for this redirect loop problem

see http://www.floor-protect.com/shop/

if you add something to the cart and try and checkout it tries to load https://www.floor-protect.com/shop/checkout/onepage/

but shows a redirect loop.

this is driving me crazy!

does anyone have a reliable fix? PLEASE
Dan

 
Magento Community Magento Community
Magento Community
Magento Community
 
tim_bezhashvyly
Jr. Member
 
Avatar
Total Posts:  17
Joined:  2010-05-19
 

For those of you who don\’t have $_SERVER[`HTTP_X_FORWARDED_SERVER`] variable set also but have $_SERVER[`SERVER_PORT`] set to 443 (or any value different from standard HTTP port or your server) this code added to the top of index.php may be a solution:

if($_SERVER[`SERVER_PORT`== 443{
 $_SERVER[
`HTTPS`=`on`;
}
 
Magento Community Magento Community
Magento Community
Magento Community
 
boziboy
Member
 
Total Posts:  44
Joined:  2009-11-05
 

Hello everyone,

I have a wordpress site installed on my maindomain.com and my shop is installed on shop.maindomain.com. However when I try and access a secure page my wordpress site loads, but my domain remains https://shop.maindomain.com in the browser address bar. I havn’t changed any settings, but my host did relocate my files to another server after they recieved a DOS attack. Please I need some insight, some direction, nothing seems to work and this doesn’t make sense to me because I have another magento site with the same host but it is installed on a main domain.

Thanks in advance!

~ Jason

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