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.phpurl,它会很好地打开主页。单击登录选项卡后,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的信息