I wish to rewrite and 301 redirect a URL with query parameter like the below:-
domain.com/link.asp?StockNo=601-0287
to something such as the below:-
domain.com/Product-Name
The stock number will be different for many URL's as will the Product-Name for each.
There is not many URL's to do so manually writing would not be an issue...
Something such as the below is not working:-
RewriteRule ^link.asp/?StockNo=601-0287$ /Product-Name/$1 [R=301,L]
But this would be the kind of desired rules.
What would be the best way to handle these rewrites?
Would a RewriteCond be required? I'm presuming {QUERY_STRING} wouldn't be required because the Product-Name does not match the query string?
Thanks in advance.