Wamp – Configuring Virtual Directory

I often encounter a situation in which I can not put my web site inside www folder. for novice developers its a tricky job to handle this scenario.
Here I am going to explain that how web developers can configure a virtual directory which is any where on hard disk outside www folder.



Step 1 Create a folder on hard disk, for example “E:/secure-sites/mysitefolder”
Step 2 I assume WAMP is already running and you can see the speedometer icon in notification area. Click on speedometer icon and go to Apache >> Alias Directories >> Add an alias
Here a new command prompt will appear.
Step 3> Enter the site name you want to use, remember to avoid spaces and special characters, you can use – (dash) or _
for example, write, mysite and press enter
Step 4 Now in next line write the path to your desire directory. In my case it is, E:/secure-sites/mysitefolder

Remember to use forward slashes and avoid spaces in directory names as well. Hit Enter and we are done.

Now you can browse your site as url, http://localhost/mysite/

Try it and remember to post feedback.

Good Luck!

Post Tags: