Zen Follower
- Join Date:
- Mar 2010
- Location:
- UK
- Posts:
- 449
- Plugin Contributions:
- 0
I've deleted products. How do I redirect customers to new ones? or to search instead?
RewriteRule cannot 'see' query string data. It only sees the 'path part' of a URL, following the initial slash, up until the question mark.
Use a preceding RewriteCond testing %{QUERY_STRING} to see the parameter data, in the same way others have looked at THE_REQUEST and HTTP_HOST and REQUEST_URI.
Clear those parameters with a trailing question mark on the end of the target URL to stop them being re-appended.
Make sure that the most 'specific' rule is listed FIRST, otherwise you risk creating an unwanted 'redirection chain' for non-www requests.
Online since 1995.