|
Home > Archive > Apache Server configuration support > July 2006 > MOD_REWRITE - the same number of arguments problem
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
MOD_REWRITE - the same number of arguments problem
|
|
| janecki@gmail.com 2006-07-28, 7:31 am |
| I have problem with MOD_REWRITE.
I have two possibilities for my index.php page:
RULE1: index.php?city=something&state=&something
RULE2: index.php?state=something&phone=&something
How to tell MOD_REWRITE to use 1st rule when 'city' and 'state' are
arguments and how to tell to use second rule if 'state' and 'phone'
are args.
Is it possible with MOD_REWRITE?
How to differentiate the arguments?
Thank You!
| |
|
| <janecki@gmail.com> schreef in bericht
news:1154086105.748695.115930@p79g2000cwp.googlegroups.com...
> I have problem with MOD_REWRITE.
>
> I have two possibilities for my index.php page:
>
> RULE1: index.php?city=something&state=&something
> RULE2: index.php?state=something&phone=&something
You are inconclusive, I assume these are the requests as made by the browser
> How to tell MOD_REWRITE to use 1st rule when 'city' and 'state' are
> arguments and how to tell to use second rule if 'state' and 'phone'
> are args.
>
> Is it possible with MOD_REWRITE?
> How to differentiate the arguments?
By appliing a condition to the query_string
RewriteCond %{QUERY_STRING} \bcity=
RewriteRule [rule1] [QSA,L]
RewriteCond %{QUERY_STRING} \bphone=
RewriteRule [rule1] [QSA,L]
HansH
|
|
|
|
|