1
votes

I want to redirect via htacces on url with parameter ofr example:

domain1.com/asd -> domain2.com/sdew;as domain1.com/ase -> domain2.com/sdew;aw

I use in htacces conditions as bellow:

RewriteCond %{HTTP_HOST} ^domain1.com$ [NC]
RewriteRule ^aa/bb-l(/.*)?$ http://www.domain2.com/ssd/sdew;as [R=301,L,NC]

This rule redirect from domain1.com/asd to http://www.domain2.com/ssd/sdew%3bas

not to http://www.domain2.com/ssd/sdew;as

1

1 Answers

1
votes

Change flags [R=301,L,NC] to [R=301,L,NC,NE]

NE|noescape

By default, special characters, such as & and ?, for example, will be converted to their hexcode equivalent. Using the [NE] flag prevents that from happening.

http://httpd.apache.org/docs/2.2/rewrite/flags.html