Virtual Directory in WAMP using Symbolic Link
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, by default it would link to target file
[virtualDirectoryName] is the name of the virtual directory in the wamp/www folder
[TargetDirectory] is the target directory to which you want to link the virtual directory
For example, if I want to create a site using name ‘mysite’ and I want to link this virtual directory to the directory ‘d:\somefolder\sitecontent’, then, assuming the location of wamp as ‘c:\wamp\www’, I 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 directories in wamp so that you would not have to put all the content into wamp/www directory.
Naresh Khokhaneshiya said,
May 21, 2008 @ 5:23 am
We can create virtual directory using another way ::
Right click on the taskbar icon of wamp.
Go to Alias Directories menu.
Click on add alias option.
Enter the name of the virtual directory.
Enter the directory path of actual directory.
Naresh Khokhaneshiya said,
May 21, 2008 @ 10:27 pm
mklink command is not found in Windows XP but it is there in Windows Vista. We need to use alias instead of softlink in Windows XP.
method said,
June 2, 2008 @ 4:24 pm
Hi all could any one tell me how to make Alias pointing to external hardrive folder in wamp5 1.4.4. I don’t want to upgrade wamp since i am in middle of a project that can’t stop it.Hope you guys help me.Thanks
Naresh said,
June 3, 2008 @ 8:44 pm
In the ‘alias’ directory under wamp, create a file with the aliasname.conf. In that file write following code ::
Alias /aliasname “absolute path of your project/”
Options Indexes FollowSymLinks MultiViews
AllowOverride all
Order Deny,Allow
Allow from all
Allow from 127.0.0.1
OR instead of doing all these things, just create copy of phpmyadmin.conf file in alias directory, rename the file to desired alias, edit the renamed file and reset the alias name and directory path.
Restart the WAMP-Apache and it’s done.
Regards,
Naresh