RewriteProxy on specific value in RewriteCond Query_string

ISAPI_Rewrite is Apache mod_rewrite compatible URL rewriter for Microsoft IIS
User avatar
Posts: 4
Joined: 15 Jul 2014, 13:45

RewriteProxy on specific value in RewriteCond Query_string

15 Jul 2014, 13:50

I'm trying to evaluate the value of a url variable in order to proxy on it.

For instance: www.domain.com/page.htm?stuff=main.goproxy

When "main.goproxy" is found in the query string, I want to proxy my content. The following RegEx passes the test in the testing tool but it's not working on my site. This is my first time using this tool so I appreciate the assistance.

RewriteCond %{QUERY_STRING} ^stuff=.*\b([Gg]o[Pp]roxy)\b$ [NC]
RewriteProxy ^$ http://www.someotherdomain.com/register [L]

User avatar
Posts: 1264
Joined: 07 Mar 2012, 10:16

Re: RewriteProxy on specific value in RewriteCond Query_stri

15 Jul 2014, 23:15

Hello,

Let try using the following for the start:

Code: Select all
RewriteEngine on
RewriteBase /

RewriteCond %{QUERY_STRING} main\.goproxy [NC]
RewriteProxy .+ http://www.someotherdomain.com/register [NC,L]


Regards

Return to ISAPI_Rewrite 3.0

Who is online

Users browsing this forum: No registered users and 0 guests