Reputation: 3066
In wordpress if pages are not found it automatically redirects 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
Upvotes: 0
Views: 308
Reputation: 12508
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.
Upvotes: 0
Reputation: 11490
ErrorDocument 404 /default.php
Add this in .htaccess file
Upvotes: 1