rewrite rule for php easter eggs

mike mike503 at
Sun Apr 13 12:20:26 MSD 2008

you need a proper regular expression.

this should match it anywhere in the url, i.e.

it shouldn't just check for ending in it, because the query string
might still be active even though it has another key/value pair on the
end of it.

rewrite (.*)PHPB8B5F2A0-3C92-11d3-A3A9-4C7B08C10000(.*) /index.php last;

(i think that should work!)

On 4/13/08, Renaud Allard <renaud at> wrote:
> Hello,
> I am trying to wrote a rewrite rule to forbid the request of PHP easter
> eggs.
> So I'd like the request:
> http://site.domain.tld/?=PHPB8B5F2A0-3C92-11d3-A3A9-4C7B08C10000
> to be redirected to index.php
> I tried:
> rewrite PHPB8B5F2A0-3C92-11d3-A3A9-4C7B08C10000 /index.php last;
> Or subsets of this one, but it doesn't seem to work. The rewrite doesn't
> seem to be processed when I access the page.
> Has someone an idea of why the rule isn't processed?

More information about the nginx mailing list