You can setup a virtual directory in WAMP using Symbolic Link. You have to create a symbolic link in Windows using following command :
mklink /D [virtualDirectoryName] [TargetDirectory]
where,
/D indicates the target is a directory and not a file. If you don’t provide this then it will take file as target by default
[virtualDirectoryName] is the name of the virtual directory
[TargetDirectory] is the target directory to which you want to link the virtual directory
For example, if you want to create a site using name ‘mysite’ and you want to link this virtual directory to the directory ‘d:\somefolder\sitecontent’, then assuming the location of wamp as ‘c:\wamp\www’ you will create symbolic link as follows :
mklink /D c:\wamp\www\mysite d:\somefolder\sitecontent
I think it would be very useful to create virtual directory in wamp so that we would not have to put all the content into www directory of wamp.
Posted by Naresh Khokhaneshiya on May 21, 2008 at 1:12 pm
You can create virtual directory by other way as ::
Right click on the task manager icon of the wamp.
Go to Alias Directories.
Click on add alias.
Enter name of virtual directory – alias.
Enter the directory path where you want to link virtual directory.
Posted by WAMPserver and Virtual Hosts? | Free Hosting Blog on March 9, 2009 at 8:43 pm
[...] have to "create" the symbolic link to the virtual directory in Windows. http://nareshkhokhani.wordpress.com/2008/05/21/virtual-directory-in-wamp-using-symbolic-link/ Also be sure you set the Document Root directory correctly. [...]