Apache 当.htaccess重写规则删除“index.php”时,errordocument不工作

Apache 当.htaccess重写规则删除“index.php”时,errordocument不工作,apache,.htaccess,mod-rewrite,errordocument,Apache,.htaccess,Mod Rewrite,Errordocument,我正在尝试使用我的.htaccess从以下位置修改我的URL: 我的httpd.conf包含: <Directory /var/www/<myURL>...> allow from all Options Indexes FollowSymLinks Includes AllowOverride all order allow,deny </Directory> 几天来我一直在努力解决这个问题。非常感谢您的帮助!:- 我非常确定正确的拼写是ErrorDocu

我正在尝试使用我的.htaccess从以下位置修改我的URL:

我的httpd.conf包含:

<Directory /var/www/<myURL>...>
allow from all
Options Indexes FollowSymLinks Includes
AllowOverride all
order allow,deny
</Directory>

几天来我一直在努力解决这个问题。非常感谢您的帮助!:-

我非常确定正确的拼写是ErrorDocument,而不是ErrorDocument……除此之外,我不明白这意味着如何工作:您将每个请求重写为物理文件系统中不存在的内容,并将其写入路由器脚本index.php。那么http状态404应该如何提升呢?嗨。是的,我将修复errordocument的拼写,但是问题仍然没有解决。有没有办法重写URL,删除index.php并恢复到404,以防丢失页面?还是一切都必须在PHP中完成?@Arkascha ErrorDocument不区分大小写。如果缺少什么,请还原到错误文档?您将所有内容重写为index.php,它很可能一直存在。
 <myURL>/something/something
DirectoryIndex index.php
<IfModule mod_rewrite.c>
   RewriteEngine on
   RewriteCond %{REQUEST_FILENAME} !-d
   RewriteCond %{REQUEST_FILENAME} !-f
   RewriteRule ^(.*)$ index.php/$1 [QSA,L]
   ErrorDocument 404 "message failed"
</IfModule>
<Directory /var/www/<myURL>...>
allow from all
Options Indexes FollowSymLinks Includes
AllowOverride all
order allow,deny
</Directory>