I want to redirect to URL when my query string is equal to -this-is-test1
Redirect /search/product/basecamp?-this-is-test1 https://www.some-example.com/search/product/result-this-is-test1
Note: There is the only value not any key in the query string.
2
Answers
Could you please try following, make sure you clear your browser cache after placing these rules into yout .htaccess file.
You cannot match query string in
Redirect
orRedirectMatch
directives.You may use this rule based on
mod_rewrite
module:?
at the end of target will strip any query string.References: