When working on a website, it is not uncommon for developers to locally host websites on their own computers first, as it is often a good idea to run and test your website before you publish it online, so that you avoid having your live website run into errors and bugs.
If you are a Windows user, one of the several local web hosting softwares you have available to you is WampServer, which normally runs on the localhost
URL when it is started up.
Fun fact: Wamp stands for Windows, Apache, MySQL and PHP. It is a play on the term LAMP (where L stands for Linux, and the rest of the letters mean the same as those in Wamp), as almost all web servers in the early days of the web ran on such a set-up. Today, LAMP stacks are still widely used to host many websites.
While running on localhost
gives us the benefit of using root-relative URL paths, it still has a distinct drawback — it is a hassle to run multiple websites off the localhost
URL, as it will still cause the aforementioned root-relative URL paths to break.
Fortunately for us, it is possible to set up what I call “local domains” on WampServer, so that you can use URLs outside of localhost
to access your websites on WampServer.
Continue reading →