當我關閉重寫時,404正確地轉向Google(僅用於測試),就像它應該的那樣。當它打開時,首先運行重寫並完全忽略ErrorDocument聲明。我不明白爲什麼這樣做。在Mod重寫Htaccess之前運行ErrorDocument
Options +FollowSymlinks
ErrorDocument 404 http://www.google.com
<IfModule mod_rewrite.c>
RewriteEngine Off
RewriteBase/
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
得到了......我需要該部分的永久鏈接才能正常工作。我原以爲ErrorDocument會在這部分之前重定向。 –
@AndrewThreadgill請檢查更新。 –
好吧,我將如何重定向被永久鏈接捕獲的404? –