I want to capture, and redirect, URLs that contain certain parameters (after
the ?). I have been reading a number of articles (web pages) on mod Rewrite,
but can't seem to get it working like I want.
For example, I want to redirect all URLs with "wxyz" in them, such as:
a.html?p1=123,p2=qwerty,wxyz=4
b.html?wxyz=def
Is what I want to do possible?
If so, can someone point me to an article (web page) or two that I can read?
(the pages I've found so far have not provided me the info I need.)
TIA.
Charles...
This can be done using mod_rewrite. The parameters after the ? are
known as the Query_string. Rewrite Rules can be written that are
conditional on query_string matching a regular expression:
RewriteCond %{QUERY_STRING} wxyz
RewriteRule (.*) <redirect URL>
[snip]
>
> This can be done using mod_rewrite. The parameters after the ? are known
> as the Query_string. Rewrite Rules can be written that are conditional on
> query_string matching a regular expression:
>
> RewriteCond %{QUERY_STRING} wxyz
> RewriteRule (.*) <redirect URL>
Thanks Jim;
I went back and scanned all my articles -- and there in one of them is the
mention of using {QUERY_STRING}. Looks like I missed it while trying to
absorb all the other info.
Thanks again.
Charles...