On 2/28/07, <b class="gmail_sendername">Roxis</b> <<a href="mailto:roxis@list.ru">roxis@list.ru</a>> wrote:<div><span class="gmail_quote"></span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
On Wednesday 28 February 2007, Andy Triboletti wrote:<br>> What if I want to redirect when the referer is <a href="http://bob.com">bob.com</a> with args of 12345<br>> and also redirect if referer is <a href="http://andy.com">
andy.com</a> with args of 987? I tried having<br>> two location ~* things {} blocks ,but it is not processing both.<br><br>if ($http_referer ~ "^.*bob\.com.*$") {<br> rewrite "^.*12345.*$" /disabled break;
<br>}<br><br>if ($http_referer ~ "^.*andy\.com.*$") {<br> rewrite "^.*987.*$" /disabled break;<br>}</blockquote><div><br> </div>Unfortunately that's not working for me because the 12345 and 987 are query params on a flash .swf file and they're not showing up in the rewrite test for the url. Thanks for the suggestions so far though!
<br><br>Here is some of the debug notice output when trying to do the rewrites:<br>2007/02/28 11:11:28 [notice] 2989#0: *881 "^.*andy\.com.*$" matches "<a href="http://andy.com/">http://andy.com/</a>", client:
<a href="http://127.0.0.1">127.0.0.1</a>, server: localhost, URL: "/thing.swf?thing_id=987", host: "localhost", referrer: "<a href="http://andy.com/">http://andy.com/</a>"<br>2007/02/28 11:11:28 [notice] 2989#0: *881 "^.*987.*$" does not match "/thing.swf", client:
<a href="http://127.0.0.1">127.0.0.1</a>, server: localhost, URL: "/thing.swf?event_id=987", host: "localhost", referrer: "<a href="http://andy.com/">http://andy.com/</a>"<br><br></div>