I have URL not found problem in my site. because i have removed some pages but indexed in google. so want to redirect to the home page of my site. The following is the URL: http://www.site.com/2007/01/criteria-query-examples-in-last-lesson.html this url should be redirected to http://www.site.com what will be the RewriteRule for this.
digitalboy, that won't work. And he only wants removed pages to redirect to home pages, not to set the error document for 404 errors. (Which would be done with ErrorDocument, not Redirect. krishna, just use a "Gone" status and Google will take the page out of the index next time it crawls your site: Redirect 410 /2007/01/criteria-query-examples-in-last-lesson.html ErrorDocument 410 / Code (markup): The ErrorDocument is used to redirect users to the home page.
one more doubt: i am setting like this : Redirect 410 /sitedir/news/cheap%20xenical Redirect 410 /sitedir/news/goodwork%20abi Redirect 410 /sitedir/news/goodwork%20adv Here %20 is space in the url. how can i set it in the Rule. Please help me.
This will apply to any file inside the /2007/01/ directory RedirectMatch 410 /2007/01/.+ Code (markup): "Gone" status means a page no longer exists, and is done by sending a 410 status code as in the code above. Just use a space, but wrap the URL in quotes, e.g.: Redirect 410 "/sitedir/news/cheap xenical" Redirect 410 "/sitedir/news/goodwork abi" Redirect 410 "/sitedir/news/goodwork adv"