1

example: https://www.mydomain.de/myproduct/?___store=french&___from_store=german to https://www.mydomain.de/myproduct/

I have a store and want to dynamically permanent rewrite storeviews of hundrets of urls to one part of the same url.

And this for many URLs at ones redirecting via 301 to the product part

Can you help me?

Susan
  • 21
  • 1

1 Answers1

0

You can use this rule to strip off the query string:

RewriteCond      %{QUERY_STRING}    ___store=
RewriteCond      %{QUERY_STRING}    ___from_store=
RewriteRule      (.*)               $1?     [R=301,QSD,L]

It checks if the query string containing ___store= and ___from_store=, then redirect to the same URL permanently without the query string.

Ben
  • 5,069
  • 4
  • 18
  • 26