Recently I found that sitting in front of big screen have many pros and that's why I started to looking for things that would speed up working with many projects.
First of all I installed XAMPP.
Next, in Apache documentation I found module called vhost_alias which allows to map requested address to local file system without touching mod_rewrite rules.
I store my projects in D:/Projects so it looks like following (replace in http-vhosts.conf):
<VirtualHost *>
UseCanonicalName Off
VirtualDocumentRoot "D:/Projects/%1/
<Directory "D:\Projects">
Order allow,deny
Allow from all
Options FollowSymLinks
AllowOverride All
</Directory>
</VirtualHost>
Next I had to manually add entries to windows/system32/drivers/etc/hosts file, which maps domains to IP address before making DNS request. I found opening this file as administrators really boring plus it took so many time.
In about 10 minutes I wrote application in C# which allows me to modify this file. It's simple, without support for comments (it will ommit them when saving again):
You can download it here: HostsEditor.exe
Beware: Bitdefendeer removed contents of my hosts file after I added mapping for google.com :P
Brak komentarzy:
Prześlij komentarz