Php 为什么找不到页面系统在.htaccess文件中不工作?

Php 为什么找不到页面系统在.htaccess文件中不工作?,php,.htaccess,Php,.htaccess,当用户输入错误的url时,我使用以下.htaccess规则显示not-found.php页面,例如www.myurl.com/error my.htaccess文件: ErrorDocument 404 /not-found.php RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME}.php -f RewriteRule ^(.*)$ $1.php [NC,L] 但不知怎么的,

当用户输入错误的url时,我使用以下.htaccess规则显示not-found.php页面,例如
www.myurl.com/error

my.htaccess文件:

ErrorDocument 404 /not-found.php
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME}.php -f
RewriteRule ^(.*)$ $1.php [NC,L]
但不知怎么的,它不起作用了。它在向我展示

Not Found

The requested URL /myfolder/mysite/gift-cardsdf was not found on this server.

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.

Apache/2.4.16 (Win32) OpenSSL/1.0.1p PHP/5.5.28 Server at localhost Port 80

我该怎么解决呢?

如果你想知道答案,就不要打谜语。发布您当前的
.htaccess
,您还希望我们如何帮助您?当您说“以下.htaccess规则”时,您能将其包含在您的问题中吗?对不起。这是个错误。我更新了我的post.not-found.php与.htaccess在同一个目录中?如果
example.com/not-found.php
不起作用,那么显然您的
ErrorDocument 404也不起作用。