Trying to redirect a URL with a query string to a subdomain, and can't get it to work.
The goal is to make www.example.com/services/json?method=views.get become old.example.com/services/json?method=views.get
I have in the .htaccess file:
RedirectMatch 301 ^www\.example\.com/services/json$ http://old.example.com/services/json$1
In Chrome, it just stays at the www domain.
In Firefox, it fails once, saying "Firefox has detected that the server is redirecting the request for this address in a way that will never complete." But if I hit Try Again, it goes to the subdomain just fine.
This is infuriating, and any help is appreciated. I've tried several different patterns.
Thanks!
Also, there are double quotes in the query string. Is it possible to keep them without them becoming encoded to %2522?
$1should not be there.