复制代码 代码如下:
location ~* /.(gif|jpg|jpeg)$ {
rewrite /.(gif|jpg)$ /logo.png;
}
复制代码 代码如下:
$host:localhost
$server_port:88
$request_uri::88 /test1/test2/test.php
$document_uri:/test1/test2/test.php
$document_root:D:/nginx/html
$request_filename:D:/nginx/html /test1/test2/test.php
复制代码 代码如下:
server {
listen 80;
server_name start.igrow.cn;
index index.html index.php;
root html;
if ($http_host !~ "^star/.igrow/.cn$" [点击图片可在新窗口打开] {
rewrite ^(.*) $1 redirect;
}
}
复制代码 代码如下:
location ~* /.(gif|jpg|swf)$ {
valid_referers none blocked start.igrow.cn sta.igrow.cn;
if ($invalid_referer) {
rewrite ^/ $host/logo.png;
}
}
复制代码 代码如下:
location ~* /.(js|css|jpg|jpeg|gif|png|swf)$ {
if (-f $request_filename) {
expires 1h;
break;
}
}
复制代码 代码如下:
location ~* /.(txt|doc)${
root /data/www/linuxtone/test;
deny all;
}
新闻热点
疑难解答