Magento staging site - secure urls redirecting to live site

3k Views Asked by At

Following the Crucial staging setup tutorial, I copied our live setup to a staging environment. Unlike many other posts about staging sites redirecting to the live site, I'm only having half that problem.

All my unsecured url's work fine, no issues. It's only the secured url's. So if I try to access customer account, login, go to my cart, etc. I will get kicked back to the live site.

So far I've:

  • Checked that my staging db is being called and not my live db (it is)
  • Cleared cache, sessions (please don't tell me to do this again)
  • Changed .htaccess RewriteBase to /staging/ instead of /
  • Checked local.xml to ensure all settings are correct
  • Changed all url entries in core_config_data
  • Started all over and tried it a second time

The only possible thing that I can think of is that my SSL cert doesn't like these url's so it's redirecting back to the originating url that it was registered with. My SSL cert. is NOT a wildcard which makes sense except that the browser should just ask you if you want to add an exception (in my case Firefox).

4

There are 4 best solutions below

1
On BEST ANSWER

My hosting provider said I cannot do this with my current SSL cert. So now I am looking at alternatives.

3
On

Are you positive that you changed both of these in the core_config_data table:

web/secure/base_url
web/unsecure/base_url

Also, you could try setting these to 0:

web/secure/use_in_frontend
web/secure/use_in_adminhtml
0
On

I had a similar problem & solved it by clearing my Magento cache. I Simply deleted everything from the /var folder of my Magento site. After that I cleared my browser's cache/cookies for good measure & it worked!

0
On

I just solved this issue today, after looking everywhere and finding no solution that worked for me.

Edit the core_config_data table on your staging database and change the value for the path called "web/secure/base_url" to reflect a non-https address. For example, instead of https://www.example.com, use http://www.example.com

I was able to get to my login page for the admin backend after this quick fix.