404 page redirection1 user found helpful
Is there any simple way to redirect my visitors directly to the main page instead of 'page not found' page, when the url page doesn't exists ?
rather than redirect them to your homepage you should really redirect them to a custom 404 page.
This can look exactly like your homepage if you like but if a page is missing then generally you should return a 404 so that it drops out of search engine indexes etc.
I have a blog post on this - rather than drop it here have PM'd you the link:
Hope that helps.
1/ I don't know how to use 301 on deleted pages (unless to recreate them)
2/ I don't know all the deleted pages
So the use of 404 is OK for me because it catch all the deleted pages.
You'd need to copy and paste these and corss-reference them with a list of the correct URLs and add them to an .htaccess file as 301 redirects.
If it is a lot of URLS it could be time-consuming and tedious through.
If you do try redirecting your 404 and end up accidentally returning a 404 for your homepage it will never get indexed.
I'd create a custom 404 to be honest... if doing the redirects was too difficult.
If the duff links have a particular format/syntax to them you can probably catch them with a regular expression in your htaccess file and 301 them that way - for example your real links won't have a '%' symbol in them. A regex could be used to redirect if % was part of the URI.