Firstly you will need to edit a Magento file to acheive this technique, it’s pretty easy to do so anyone should be able to follow this tutorial but if your not confident editing a file get a friend who is to do it for you. To edit any files we recommend that you use PSpad which is a text editor specifically built for editing php, javascript files etc.
1) Open you Magento folder and go to the directory /js/prototype/
2) You will see a file titled validation.js, open this file in your text editor.
3) Look for the code between lines 505 to 507, it should look like the code snippet below.
1
2
3
|
['validate-url', 'Please enter a valid URL. Protocol is required (http://, https:// or ftp://)', function (v) {
return Validation.get('IsEmpty').test(v) || /^(http|https|ftp):\/\/(([A-Z0-9][A-Z0-9_-]*)(\.[A-Z0-9][A-Z0-9_-]*)+)(:(\d+))?\/?/i.test(v)
}],
|
4) now you want to comment out those three lines of code by typing // in front of each of them, the code snippet below gives an exact example of what you should end up with after the edits. These edits disable only those three lines of code which check for a valid domain name upon Magento installation.
1
2
3
|
//['validate-url', 'Please enter a valid URL. Protocol is required (http://, https:// or ftp://)', function (v) {
//return Validation.get('IsEmpty').test(v) || /^(http|https|ftp):\/\/(([A-Z0-9][A-Z0-9_-]*)(\.[A-Z0-9][A-Z0-9_-]*)+)(:(\d+))?\/?/i.test(v)
//}],
|
5) Install Magneto on your localhost, after install has completed successfully revert the validation.js file to it’s original code by removing the instances of // you added.
You should now have a fully functional install of Magento on your WAMP, XAMPP install on your home PC or business development server.
Follow this link-
http://futureplanmedia.com/how-to-install-magento-on-localhost-without-url-validation-error/