Magento localhost installation Invalid Base URL

Posted by Damodar Bashyal on December 01, 2011

 

I was installing magento on localhost so i can test different magento extensions. But on configuration page I was getting error for base url as below:

The URL "http://www.magento.ag.com/" is invalid.
Response from server isn't valid.

The URL "http://www.magento.local/" is invalid.
Response from server isn't valid.

The URL "http://localhost/" is invalid.
Response from server isn't valid.

Note: I was trying with different urls but all failed. At last found one solution.

Update this file: app/code/core/Mage/Install/Model/Installer/config php

replace line:

$prefix = $secure ? 'install/wizard/checkSecureHost/' : 'install/wizard/checkHost/';

with:

$prefix = $secure ? 'index.php/install/wizard/checkSecureHost/' : 'index.php/install/wizard/checkHost/';


or,
replace line:

$client = new Varien_Http_Client($url.$prefix);

with:

$client = new Varien_Http_Client($url.'index.php/'.$prefix);


NOTE: newer versions of magentos already got this fix but still I was getting same error.

Finally, the live saver trick was to check the checkbox of option:
=> Skip Base URL Validation Before the Next Step

Then, everything worked as I wanted.

ohoo!

Felipe Miranda posted on - Wednesday 24th of August 2016 06:38:03 AM

I was able to fix it by editing /etc/hosts and set ip and hostnames
 
not published on website


QR Code: Magento localhost installation Invalid Base URL