URLs don't change for 404 and WordPress 404 page does not load
I have designed the 404 page for WordPress however whenever I try typing out an address like www.homepage.com/gobblegobble
the URL stays the same and the page that is shown is my home page i.e. www.homepage.com
.
Ideally, for these kind of random links I want the 404.php page to be shown. How do I change that?
My .htaccess file is in the htdocs/WordPress folder and is like this:
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
#uploaded files
RewriteRule ^files/(.+) wp-includes/ms-files.php?file=$1 [L]
R开发者_JAVA技巧ewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^ - [L]
RewriteRule . index.php [L]
ErrorDocument 404 /index.php?error=404
I have solved this by tweaking the permalinks slaps forehead. Sorry for the trouble caused.
You need to take the 404.php
file under the current theme's directory. WordPress will handle it, you don't need to change anything on .htaccess
.
精彩评论