rewrite rules
Stefanita rares Dumitrescu
lists at ruby-forum.com
Fri Jan 25 16:04:39 MSK 2008
Roxis wrote:
> On Friday 25 January 2008, Stefanita rares Dumitrescu wrote:
>> > RewriteRule \.(zip|mp3)$ - [NC,F,L]
>> i can do anything else but rewrite :)
> server_name domain.com www.domain.com;
>
> valid_referers none blocked server_names;
>
> location ~* \.(zip|mp3)$ {
> if ($invalid_referer) {
> return 403;
> #rewrite / http://www.domain.com/;
> }
> }
thanks !
i got the final config as:
location ~* ^.+.(zip|mp3)$ {
if ($invalid_referer)
{
#return 403;
rewrite / http://www.domain.com/;
}
root /home/user/public_html;
expires 30d;
}
--
Posted via http://www.ruby-forum.com/.
More information about the nginx
mailing list