I have old product pages on my online store. I deleted products but product links still shown on google search results. I want to redirect these product pages to root.
in .htacess
Redirect 301 https://www.example.com/shop/prodView.asp?idproduct=276 https://www.example.com
but this doesnot work. I dont want to use rewrite condition because some products which have similar url, are still exists.
RewriteCondition? You need to use one if you want to detect specific get arguments in the URL. If you don't want to, but want to redirect all requests to the URL regardless of the arguments, then just omit the condition and all is fine. So please take the time to revise your question and clearify that point. Thanks. - arkascha