Reputation: 57
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
Upvotes: 1
Views: 55
Reputation: 18671
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.
Upvotes: 1