XAMPP:别名问题 - 错误 404
我正在尝试别名: /htdocs/test/index.php
在我的 xampp/apache/conf/extra/httpd-xampp.conf 中,我有以下条目:
<IfModule alias_module>
<IfModule mime_module>
Alias /test/ "D:/Installation/xampp/htdocs/test"
<Directory "D:/Installation/xampp/test">
<IfModule php5_module>
<Files "index.php">
php_admin_flag safe_mode off
</Files>
</IfModule>
Order allow,deny
Allow from all
</Directory>
</IfModule>
</IfModule>
当我转到 http://localhost/test/,我得到显示的目录列表。当我输入此 URL - http://localhost/test/ 时,我想要此文件 - /test/ index.php 打开。
当我尝试直接访问此 URL“localhost/test/index.php”时,我收到“错误 404 未找到对象”消息。
我做错了什么?
I am trying to alias this:
/htdocs/test/index.php
In my xampp/apache/conf/extra/httpd-xampp.conf, I have the following entry:
<IfModule alias_module>
<IfModule mime_module>
Alias /test/ "D:/Installation/xampp/htdocs/test"
<Directory "D:/Installation/xampp/test">
<IfModule php5_module>
<Files "index.php">
php_admin_flag safe_mode off
</Files>
</IfModule>
Order allow,deny
Allow from all
</Directory>
</IfModule>
</IfModule>
When I go to http://localhost/test/, I get the directory listing shown. When I type in this URL- http://localhost/test/, I want to have this file- /test/index.php opened.
When I try to go to this URL directly "localhost/test/index.php", I get "Error 404 Object not found" message.
What am I doing wrong?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
找到 httpd-xampp.conf 文件中包含以下内容的部分:
将“index.php”添加到 DirectoryIndex 行。
Find the section of your httpd-xampp.conf file with the following:
Add "index.php" to the DirectoryIndex line.