Regex pattern for certain query string values

CLOSED

Regex pattern for certain query string values

Postby slickvic78 » Sun Apr 22, 2012 12:21 pm

Hello,

I would like to mod_rewrite the following example URL -> http://www.test.com?pg=test&foo1=bar1&foo2=bar2

Is there a RegEx that would allow me to match the value of pg (assuming pg is always 1st param in the query string) and then foo1=bar1&foo2=bar2 (essentially the rest of the query string if present)

to:

http://www.test.com/test.html?foo1=bar1&foo2=bar2

using a redirect of

/%1.html?%2 [R=301,L]

Any assistance would be greatly appreciated!

Regards,
-V
slickvic78
 
Posts: 8
Joined: Mon Feb 02, 2009 3:28 pm

Return to New Threads/Problems

Who is online

Users browsing this forum: No registered users and 2 guests

cron