Hassan Dad Khan
Hassan Dad Khan

Reputation: 645

magento installation, localhost/magento is redirecting to www.localhost.com/magento

I have downloaded latest version of magento from their website. When i am running it from browser like this localhost/magento it redirects me to www.localhost.com/magento. I am using windows 7 and wamp. All other projects on my localhost are working fine just magento is having this redirect problem.

This problem is occuring in office. I tried it at home on windows 8 using wamp it installed without any problem.

Do somebody know how can i solve this problem and run magento on localhost??? Please provide me some help

Upvotes: 1

Views: 1577

Answers (2)

Hassan Dad Khan
Hassan Dad Khan

Reputation: 645

Thanks james for the responce. There is nothing related to database there because this was all happening before i set up the configuration. Any ways i updated my php version and downloaded the latest version and it is running without any problem. I was using 5.3.13 previously and i dont think that its that too old that magento start doing problem.

Upvotes: 3

James Cowie
James Cowie

Reputation: 464

It sounds like the magento URL stored in the database is set to be www.localhost.com/magento when you want it to be http://localhost/magento

You can check this from a MySQL gui of the command line by running:

select * from core_config_data where path = 'web/unsecure/base_url';

How I work is by setting up in the VHOST for apache a serverName so magento.local, I then update my hosts file ( Sorry without doing a google search I dont know where this is located on windows ). Then use this URL in my magento database.

Either way check the SQL above's result compared to what you are expecting. If you have any more problems after this please paste the output from the SQL and I can help more.

Upvotes: 2

Related Questions