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
nandeesh posted on - Wednesday 30th of August 2017 11:49:43 AM
I need to change it to localhost, so that the localhost login url will be http://localhost/magento2/
so my doubt is how to change the base address back to localhost?