How to use a Windows Shortcut in WAMP www directory?

B Seven picture B Seven · Jan 27, 2012 · Viewed 14.5k times · Source

I want to run PHP files in the browser that are stored on a separate partition from the www folder in the WAMP folder. I created a shortcut and put it in the www folder, but got 404 error when I tried to browse the file localhost/directory-name/index.html.

How do you set up shortcuts to other folders in the WAMP www folder on Windows XP?

OK, after doing some research, I found FollowSymLinks needs to be set in the Apache config file. It includes Options Indexes FollowSymLinks, but still 404 error.

Answer

pjumble picture pjumble · Jan 27, 2012

Shortcuts in Windows have a .lnk extension so Apache doesn't know what to do with FollowSymLinks (because it's not a proper symlink).

I'd recommend either just using Aliases, e.g. in httpd.conf put:

Alias /other_projects "d:/other_projects/"

<Directory "d:/other_projects/">
   Options Indexes FollowSymLinks MultiViews
   Allow from all
</Directory>

Alternatively you can use an application to create proper sym links under windows (e.g. junction) which can be used like junction c:\wamp\www\other_projects d:\other_projects when you have FollowSymLinks enabled.