我的 .htaccess 文件具有当前设置:
Options -Indexes
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ $1\.php
当我输入 mydomain.com/file 时没问题,但是当我访问 mydomain.com/file/时出现错误 500。
没有名为"file"的文件夹,任何路径都会出现此问题。
最佳答案
尝试将 -MultiViews 添加到您的选项中。如果它仍然中断,请查看 apache error_log,您将获得对问题所在的完整解释。
关于apache - 到底如何使友好的 URL 与斜杠一起工作?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5144493/