I have to rewrite old URLs like this:
Old URL:
http://www.domain.de/index.php?id=189&ext[stars]=PvVYdx58CfBpEIcUsdDvuE4fsvnwHw
New URL:
http://www.domain.de/sub1/sub2/stars/PvVYdx58CfBpEIcUsdDvuE4fsvnwHw
So I built following rule in my .htaccess
file:
RewriteCond %{QUERY_STRING} ^id=([0-9]+)&ext\[stars\]=([A-Za-z0-9-]+)$
RewriteRule ^(.*)$ http://www.domain.de/sub1/sub2/stars/%2? [L,R=301]
but it does not work, the redirect happens to http://www.domain.de/sub1/sub2
without adding the parameter.
Any hints how to get this working?