HTTP Referer Module Support Variables? And pcre question...

Resicow resicow at gmail.com
Mon Aug 3 22:45:58 MSD 2009


Hello All,

Is it safe to use variables with the http_referer module?

I'd like to specify the valid_referers via set variables, instead of 
hard-coding them into the configuration.

So something like:
valid_referers 
<http://wiki.nginx.org/NginxHttpRefererModule#valid_referers> none 
blocked $domain1 $domain2;

Also, is it possible to somehow get the top level folder using rewrite 
and pcre?

So for example, if the URI is this: 
/folder1/folder2/lots_of_other_folders/file.txt

How would it be possible to set a variable equal to "folder1"? Everytime 
I try, it never quite works.

Thanks,

John





More information about the nginx mailing list