Question

Hello i am using xampp on my local computer and i created virtual host like www.abc.com my original website have same name. Can i set priority of my virtual host instead of online site. For example i hit www.abc.com it checks local site ("Which is inside xampp") if no website found than go online.

Was it helpful?

Solution

Create an entry in the host file of your OS. For Windows 7 it would be located in "C:\Windows\System32\drivers\etc\host".

Add a line like this "127.0.0.1 abc.com"

But keep in mind that if you do that you will always access your localhost until you remove the line again.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top