I know this must have an answer somewhere around here, but I am unable to find/locate it.
There is a typical 301 redirection rule in the same domain:
Redirect 301 /path/to/strange-url.htm /path/to/new/canonical-url.htm
Later on htaccess file, there is a rewrite rule for the canonical-url
RewriteRule ^([^/]+)/([^/]+)([^/]+)/([^-]+)-([^.]+)\.htm$ php/page.php?var1=$1&var2=$2&var3=$3&var4=$4&var5=$5 [NC,L]
Problem is that as soon as the 301 redirect activates, my new url becomes:
/path/to/new/canonical-url.htm?var1=xxxx&var2=xxxx&var3=xxxx&var4=xxxx&var5=xxxx
How can I avoid this and maintain only the clean url: /path/to/new/canonical-url.htm ?
ok i finally found a working solution
I changed all Redirect 301 rules to RewriteRule [R=301,L], so:
becomes
Also, I have moved all former redirects before the actual rewrites