我在 .htaccess 中有以下代码
ErrorDocument 400 /abc/404
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-l
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^/ - [S=2]
RewriteRule ^abc/(.*)/(.*)$ index.php?aa=$1&bb=$2 [NE,L,QSA]
RewriteRule ^abc/(.*)$ index.php?aa=$1 [NE,L,QSA]
但是每当我传递错误的网址时,我都会收到以下错误
Not Found
The requested URL /abc/[S=2] was not found on this server.
Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.
如果我删除该行RewriteRule ^/ - [S=2]
,那么我会收到以下错误
Not Found
Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.
当我尝试时,http://example.com/abcd/
我希望 .htaccess 重定向到http://example.com/abc/404
哪个页面
我在做什么错。请帮我。
提前致谢