我试图做到这一点,如果有人打开了/login,那么它应该打开/login/index.php文件。而且需要启用多视图,我发现了以下选项
1.Adding in the .htacces
<IfModule mod_negotiation.c>
Options MultiViews
</IfModule>选项+后向符号+多视图+索引DirectoryIndex index.php AddType application/x .php
但这些解决方案没有奏效。
发布于 2022-09-11 17:12:18
最后,我找到了对我有用的解决方案,希望它也能帮助到其他人。
以下是解决办法:
打开下面的文件
sudo nano /etc/apache2/mods-enabled/mime.conf在文件中找到下面一行
AddType application/x-httpd-php .php .phtml .html .htm取消注释(如果注释),并添加.php,如果它不包含它。重新启动服务器
sudo service apache2 restarthttps://stackoverflow.com/questions/73681184
复制相似问题