0
我有一個域名http://example.com wordpress安裝。我也有一些子域名,他們工作正常。 現在我想爲我的域中不存在的任何url創建自定義404頁面。例如:http://notexistingsubdomain.example.com。自定義404錯誤頁面錯誤的網址與wordpress安裝在根
如果我嘗試這個,我會得到500錯誤而不是404錯誤。
我的.htaccess看起來是這樣的:
ErrorDocument 404 /404.php
RewriteRule ^subdir-name/.*$ - [PT]
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase/
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
我怎樣才能讓我的404.php自定義404對我的域和子域每一個錯誤的網址是什麼?
我結束了使用404從WordPress安裝,但每當我在unexisting子域類型,我還是得到一個500服務器錯誤。如何解決這個問題? –