0

I have cloned my 1.9.1 install to a subdomain successfully. However an odd behavior is occurring. When I attempt to login to the admin, the page reloads, the login fields are blank, and I noticed that the url has redirected me to the original domains url.

magedev.example.com/index.php/admin (enter credentials, click login)

the page reloads as:

www.example.com/index.php/admin/index/index/key/9654a53e6793hu57dys624b51a6673e362/ 

I've changed secure and unsecure URL's in the DB. I deleted all entries in core_url_rewrite. Is this an .htaccess issue? I swapped out the sub-domain where I thought I should below.I haven't changed anything else here and probably should, but am unsure exactly what is needed. There's much more to the file but this seemed to be the only part that could be involved?

RewriteCond %{HTTP_HOST} ^website.com$
RewriteCond %{HTTP_HOST} ^www\.website\.com$
RewriteCond %{HTTP_HOST} ^website.com$
RewriteRule ^/?$ "http\:\/\/www\.website\.com\/" [R=301,L]

SetEnvIf Host www\.website\.com MAGE_RUN_CODE=default
SetEnvIf Host www\.website\.com MAGE_RUN_TYPE=store
SetEnvIf Host ^website\.com MAGE_RUN_CODE=default
SetEnvIf Host ^website\.com MAGE_RUN_TYPE=store

became

RewriteCond %{HTTP_HOST} ^magedev.website.com$
RewriteCond %{HTTP_HOST} ^magedev\.website\.com$
RewriteCond %{HTTP_HOST} ^magedev.website.com$
RewriteRule ^/?$ "http\:\/\/magedev\.website\.com\/" [R=301,L]


SetEnvIf Host magedev\.website\.com MAGE_RUN_CODE=default
SetEnvIf Host magedev\.website\.com MAGE_RUN_TYPE=store
SetEnvIf Host ^website\.com MAGE_RUN_CODE=default
SetEnvIf Host ^website\.com MAGE_RUN_TYPE=store

The first section redirected me to the old site immediately. The edit behaved as mentioned above. It takes my credentials, reloads the page from the old url and wants me to log in again. Clearly I am missing something. I put in the stock fresh install .htaccess, and its still redirecting. I've searched the DB for any instance of the old domain name, and it only appears in an extension that isn't relevant to the admin loading.

  • disbale the .htaccess file and upload the default one comes with magetno folder and then check – Shaheer Ali Aug 26 '16 at 13:38
  • did you change the base url in database core_config_data table – Shaheer Ali Aug 26 '16 at 13:42
  • Yes for both secure and unsecure. I've replaced the with stock .htaccess. Deleted cache again. Still redirecting. – Qozmiq Aug 26 '16 at 13:54
  • One thing to note is that I am getting security warnings for the certificate when I try to go to the subdomain as its not covered under the main domains cert? I have to bypass that to proceed to the admin. – Qozmiq Aug 26 '16 at 14:02
0

Do the followings:

  1. According to magento takes all config data from cache folder you have to clear the magentodir/var/cache - including all subfolders - to be sure the new config is taken.

If above not works then do the below step:

  1. also login to Phpmyadmin or any database method to empty the table core_url_rewrite (remember back up it first to make sure you have no risk).

I hope it will help you.

| improve this answer | |
  • 1
    I had previously dumped the var/cache folder many times, but I did again, and additionally added all the entries in core_url_rewrite, and yet when I login to: magedev.example.com/index.php/admin it reloads the page as www.example.com/index.php/admin/index/index/key/9654a53e6793hu57dys624b51a6673e362/. Same exact problem. – Qozmiq Aug 26 '16 at 13:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.