首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 其他教程 > 操作系统 >

nginx url重写-rewrite范例

2013-12-05 
nginx url重写-rewrite实例location ^~ /ucenter {location ~ .*\.php?${#fastcgi_pass? unix:/tmp/php-cg

nginx url重写-rewrite实例

location ^~ /ucenter {
location ~ .*\.php?$
{
#fastcgi_pass? unix:/tmp/php-cgi.sock;
fastcgi_pass? 127.0.0.1:9000;
fastcgi_index index.php;
include fcgi.conf;
}

location /ucenter/data/avatar {
log_not_found off;
access_log?? off;
location ~ /(.*)_big\.jpg$ {
error_page 404 /ucenter/images/noavatar_big.gif;
}
location ~ /(.*)_middle\.jpg$ {
error_page 404 /ucenter/images/noavatar_middle.gif;
}
location ~ /(.*)_small\.jpg$ {
error_page 404 /ucenter/images/noavatar_small.gif;
}
expires 300;
break;
}
}
jspace rewrite
location ~ .*\.php?$
{
#fastcgi_pass? unix:/tmp/php-cgi.sock;
fastcgi_pass? 127.0.0.1:9000;
fastcgi_index index.php;
include fcgi.conf;
}

location ~* ^/index.php/
{
rewrite ^/index.php/(.*) /index.php?$1 break;
fastcgi_pass? 127.0.0.1:9000;
fastcgi_index index.php;
include fcgi.conf;
}

您可能感兴趣的文章:
nginx rewrite(nginx url地址重写)的配置示例
nginx中一些常用的 URL 重写方法
nginx配置url重写及自定义404错误页面等
Nginx常用的 URL 重写方法
超详细的 NGINX URL重写实例讲解

热点排行