CodeIgniter Forums

Full Version: Create dynamic subdomain url
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

El Forum

[eluser]The Spider[/eluser]
I have an idea to create dynamic Urls when developing in my local machine and in the test server.
The url used local is http://localhost/myproject/ and the same in live is
My idea is to set local to and the test server to
Can any one help me?


El Forum

If you're running a Windows machine, you can open up c:\Windows\System32\drivers\etc\hosts in your favorite text editor, and add this line:


That will get the domain name resolving your localhost, the rest is up to you.

Obviously, this domain won't work from the outside, unless you purchase and set up the necessary DNS.