我的 URL 中的一个特定单词会触发 404 错误

问题描述 投票:0回答:0

事情是这样的。我的 .htaccess 将所有 URL 重定向到 index.php。

RewriteEngine On

RewriteCond %{REQUEST_FILENAME}  -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^ - [L]

RewriteRule ^(.*)$ index.php [L,QSA]

在我的index.php中,我只是放了一个

echo "test";
来试试。对于它工作的每个 URL,他们中的每个人但是,如果我键入“http://localhost/mysite/inventaire/”,apache 返回 404 错误,我不明白为什么,它没有任何意义。我在另一台电脑上做这个项目,我从来没有遇到过这个问题。 “inventaire”这个词似乎触发了这个错误,我不明白为什么......

我试图按照我在 SO 上看到的那样修改 http.conf,但没有帮助。我终于在我的应用程序中用“inventaires”改变了这个词,它就像一个魅力,太奇怪了......

.htaccess http-status-code-404 wamp router
© www.soinside.com 2019 - 2024. All rights reserved.