简体   繁体   中英

Wordpress redirecting to home page for non existent page

I have following rule set in my htaccess. When I try to access any non existent page it redirects me to home page. How can I stop this redirection to home page. I need to show 404 page of my theme.

RewriteRule ^([_0-9a-zA-Z-]+/)?(wp-(content|admin|includes).*) $2 [L]
RewriteRule ^([_0-9a-zA-Z-]+/)?(.*\.php)$ $2 [L]
RewriteRule . index.php [L]

Have you enabled Permalinks? Also you need to check whether your Wordpress site uses .htaccess to do its redirections, have you tried changing the AllowOverride None directive to AllowOverride All ?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM