我尝试在我的.htaccess
中设置重写。
它看起来是这样的:
RewriteEngine On
RewriteRule ^main/?$ main.php [NC,L]
当我尝试进入/main/
时,我得到的状态是404,但是如果我创建了一个文件夹main
,它就可以正常工作了。可能的问题是什么?
我的apache错误日志显示:
[Sun Jul 15 21:57:44.934337 2018] [negotiation:error] [pid 5527] [client ::1:49702] AH00687: Negotiation: discovered file(s) matching request: /home/mykolas/public_html/main (None could be negotiated).
发布于 2018-07-16 03:13:09
经过几个小时的谷歌搜索,我终于找到了解决方案。我只需要在vhosts文件的根目录中禁用MultiViews。
https://stackoverflow.com/questions/51350776
复制相似问题