繁体   English   中英

url重定向时,localhost中缺少Index.php文件?

[英]Index.php file is missing in localhost while url is redirecting?

我们有一个网站。 在我的本地主机中运行它时,每个重定向的url都缺少index.php文件。 如果我将index.php文件放在重定向的url中,它的工作正常。 但是,如果我再次单击其他任何选项卡/小部件,都会遇到相同的问题,并且每次必须在url中添加此索引文件时。 当我使用http://localhost/zimplee/trunk/index.php网址启动我的网站时,它将很好地打开主页。 单击登录选项卡后,URL将重定向到http:// localhost / zimplee / trunk / customer / account / create / 什么是我找不到的问题。 请帮我

如果在Apache上,可能您未在apache的配置文件(通常是httpd.conf)中提供DirectoryIndex设置。 将其插入其中:

<IfModule dir_module>
        DirectoryIndex index.php index.html
</IfModule>

如果不需要静态文件进行输出,则可以删除index.html

您可以在文档中了解DirectoryIndex

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM