In wordpress if pages are not found it automatically redi开发者_JAVA技巧rects to 404 page. but i want to redirect to default page which is i created in the same theme (without redirection to 404 page) when the pages are not found. how can i do this?...
Thanks Ravichandran
ErrorDocument 404 /default.php
Add this in .htaccess file
you can edit the 404.php
file, and then add the following line:
header('location:your-domain-name.com');
or you can redirect to some php file also:
header('location:default.php');
Simple trick. It works for me.
精彩评论