Link to home
Start Free TrialLog in
Avatar of Arbuckle2
Arbuckle2

asked on

How do you create a conditional redirect using .htaccess based on a query string?

I would like to redirect using my .htaccess based on a particular query string.

if i get a URL like this with "mode=app" in the query string, i'd like to redirect to a new server:
http://stage.example.com/test/?format=json&userid=%1&version=5&mode=ffp

What is the simplest way to do this? I've experimented with redirect, RedirectMatch, RewriteCond, etc but haven't been able to do it.

THANKS!
Avatar of Arbuckle2
Arbuckle2

ASKER

I suppose I could also do this inside a PHP file but i thought .htaccess made more sense.
ASKER CERTIFIED SOLUTION
Avatar of caterham_www
caterham_www
Flag of Germany image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial