cancel
Showing results for 
Search instead for 
Did you mean: 

Admin URL and DB config for development area

SOLVED

Admin URL and DB config for development area

I recently created a Development/Staging copy of my site/database and everything seems to be working correctly on the front end. So when I visit dev.mysite.com I am able to browse my store and it stays on dev.mysite.com.

 

But when I try to login/access the admin area at http://dev.mysite.com/admin/ it keeps redirecting me to https://www.mysite.com/admin/

 

I updated my core_config_data table in the Dev DB for both secure and insecure url's to http://dev.mysite.com/ and https://dev.mysite.com/I know that the front end is using the dev DB because I update my local.xml.

 

I can actually access https://dev.mysite.com/index.php/admin/system_config/edit/section/web/... but i have to manually change the URL in the address bar. When I click around the admin area it always sends me back to www

 

I am also noticing that in the Dev Admin when i navigate to System>Configuration>Web>Base URL it is still showing http://www.mysite.com/ which is leading me to believe that the Dev admin area is still using the Production DB and not the Dev DB.

 

Is there some sort of caching or setting(s) that I am not aware of?

 

Please help. Thanks.

1 ACCEPTED SOLUTION

Accepted Solutions

Re: Admin URL and DB config for development area

I suspect that you may have updated your Unsecure Base URL but not your Secure Base URL, which is why the Admin is still redirecting to the production domain. 

 

Take a look at core_config_data of your development database and see if there's any reference to the production domain at all. I believe it should and you should change it there. 

View solution in original post

5 REPLIES 5

Re: Admin URL and DB config for development area

Hi @dtacollectibles, have you tried clearing your cache?

--

Developer Relations, Adobe Experience Cloud
Problem solved? Click Accept as Solution!
Still stuck? Check out our documentation: https://magento.com/resources/technical

Re: Admin URL and DB config for development area

Yes, I cleared /var/cache/  in the dev directory. I did see a folder called /var/minicache/ would that need to be cleared as well?

Re: Admin URL and DB config for development area

I suspect that you may have updated your Unsecure Base URL but not your Secure Base URL, which is why the Admin is still redirecting to the production domain. 

 

Take a look at core_config_data of your development database and see if there's any reference to the production domain at all. I believe it should and you should change it there. 

Re: Admin URL and DB config for development area

Thank you JLHC 

Resolved. Since Im using a multi-store setup, it seems it was an issue with my HTACCESS along with the Secure URL in core_config_data. I had to set my Secure Base URL to http since my certificate does not support the dev.mysite.com domain. Here are my new settings

Development/Staging Site

HTACCESS:

SetEnvIf Host dev\.mysite\.com MAGE_RUN_CODE=mysite_com
SetEnvIf Host dev\.mysite\.com MAGE_RUN_TYPE=website

DATABASE core_config_data

web/unsecure/base_url = http://dev.mysite.com/
web/secure/base_url = http://dev.mysite.com/

 

Re: Admin URL and DB config for development area

Glad to hear that you got it resolved! Smiley Happy