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?
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.
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.
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
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
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!
I have upgraded magento 1.3 to 1.4.1.1 and implemented ssl certificate. When i click on checkout it redirects to cart page and URL of my site is adding “SID” .
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: