perl_set $url '
sub {
my $r = shift;
return $1.lc($2) if ($r->uri =~ m/^(.+\/)([^\/]+)$/);
}
';
server
{
listen 80;
server_name img.qq.com;
#index index.html index.htm;
root /data1/website/img;
if ($uri ~ [A-Z]){
rewrite ^(.*)$ $url last;
}
location ~ ^/bbs/.*\.(php|php5)$
{
deny all;
}