1

I recently copied over my live site along with database to my WAMP folder and now every time I try to get to the Backend, it redirects me to the homepage. I'm curious if there is something in the database that I have to change. I had to rewrite the core_config_data /base_url in order to get it to stop redirecting to the live site when I typed Localhost and I'm curious if it's an entry in my database that is causing it to reroute to the local Frontend. I've tried localhost/admin localhost/index.php/admin and others. Let me know if any code would help answer the question.

  • Have you flushed your local cache – pzirkind Apr 11 '13 at 19:10
  • How would I flush local cache without access to admin section? – jonullberg Apr 11 '13 at 19:23
  • go to the folder where the magento installation is, then go to var/cache and delete all of its contents – pzirkind Apr 11 '13 at 20:25
  • Right, I knew that. Yes I've done that and I still get the same problem. – jonullberg Apr 11 '13 at 20:28
  • It might be a cookie issue see:rhogue.wordpress.com/2010/09/16/… – pzirkind Apr 11 '13 at 20:33
1

If you are being redirected, the question is, does magento anything or is it the apache.

Apache

  1. check whether the index.php is called (just put a die in it and check whether the redirect still occurs)
  2. check your .htaccess for any unwanted redirects
  3. Check your VHost settings

Magento

  1. check your app/etc/local.xml what the admin path is in the node admin/routers/adminhtml/args/frontName
  2. check for a admin url in core_config_data or the local.xml for the nodes admin/url/use_custom (has to be 1) and admin/url/custom for the url
  • Ok, so my frontName is <![CDATA[admin]]> and I can't find an admin URL in core_config_data or in admin/url/use_custom in local.xml. I think this might be the problem, but I'm curious as to how to fix it. Can I add those nodes in the local.xml and it will update? – jonullberg Apr 18 '13 at 0:30
  • If there is nothing, then there is a fallback to the secure/unsecure base url – Fabian Blechschmidt Apr 18 '13 at 9:41
  • Did you check whether the redirect is from magento or apache? – Fabian Blechschmidt Apr 18 '13 at 9:42
2

Use 127.0.0.1 instead of localhost.

  • Tried that, used 127.0.0.1/admin and it didn't work. It gives me a 503 error. 127.0.0.1/ localhost/ and localhost/admin all send me back to 127.0.0.1/ – jonullberg Apr 11 '13 at 19:05
  • Have you checked the maintenance flag ? – Shaz Apr 11 '13 at 19:09
  • I found maintanence.flag.bak in my main folder, should I delete this? – jonullberg Apr 11 '13 at 19:22
0

Also you can make virtual host entry in your host file. you can find that file at Windows\System32\drivers\etc\hosts Open this file in notepad.

Make a new entry

127.0.0.1 localhost.com

Now instead of 127.0.0.1 use localhost.com (or any other name that you specify)

  • I already have that set up, both 127.0.0.1 and localhost go to my WAMP server, the problem is trying to get to the admin section of the site. If I do localhost/admin, it goes back to the frontend homepage, if I do 127.0.0.1/admin, it gives me an error page. – jonullberg Apr 18 '13 at 0:25

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.