I’ve been dealing with this redirect thing on a brand new server (Debian) with DirectAdmin and Magento 184.108.40.206 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.