Search code examples
windowsdnssubdomaindomain-nameeasyphp

How to create a private domain name?


In order to debug some functionality of a website project I would like to know if it's possible on my local host to access my http://127.0.0.1/projectName/test1/public folder with a custom domain name and create other subdomain?

I'm working with easyPHP on Windows7.


Solution

  • HOSTS File: In Notepad (as Administrator) open the file:

    C:\Windows\System32\drivers\etc\hosts
    

    To make foo.bar.com resolve to 127.0.0.1 simply add the line

    127.0.0.1       foo.bar.com
    

    You can add as many as you like.