我想在浏览器中运行 PHP 文件,这些文件存储在与 WAMP 文件夹中的 www 文件夹不同的分区上。我创建了一个快捷方式并将其放在 www 文件夹中,但当我尝试浏览该文件时出现 404 错误localhost/directory-name/index.html
.
如何在 Windows XP 上设置 WAMP www 文件夹中其他文件夹的快捷方式?
好的,经过一些研究,我发现FollowSymLinks
需要在 Apache 配置文件中设置。这包括Options Indexes FollowSymLinks
,但还是404错误。
Windows 中的快捷方式具有 .lnk 扩展名,因此 Apache 不知道如何处理 FollowSymLinks(因为它不是正确的符号链接)。
我建议只使用别名,例如在 httpd.conf 中输入:
Alias /other_projects "d:/other_projects/"
<Directory "d:/other_projects/">
Options Indexes FollowSymLinks MultiViews
Allow from all
</Directory>
或者,您可以使用应用程序在 Windows 下创建正确的符号链接(例如junction http://technet.microsoft.com/en-us/sysinternals/bb896768)可以像这样使用junction c:\wamp\www\other_projects d:\other_projects
当您启用 FollowSymLinks 时。
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)