.htaccess - Why is this RedirectMatch 301 replacing on ampersands? -


i have several redirectmatch 301s in .htaccess file. example:

redirectmatch 301 ^(?i)/testurl/?$  https://www.myurl.com/search/doctors?category:affiliation=78|79|218|80&orderby_sort=doctors_last_name|asc&child:doctors_services=1967 

when redirect kicks in, goes here:

https://www.myurl.com/search/doctors?category:affiliation=78|79|218|80/testurlorderby_sort=doctors_last_name|asc/testurlchild:doctors_services=1967 

note ampersands (&) in query string being replaced "testurl" redirectmatch. ideas going on here?

i'm running expressionengine on apache - not sure if relevant?

i resolved issue escaping "&" this:

redirectmatch 301 ^(?i)/testurl/?$  https://www.myurl.com/search/doctors?category:affiliation=78|79|218|80\&orderby_sort=doctors_last_name|asc\&child:doctors_services=1967 

Comments