伪静态问题:
想将Web地址
http://www.web.com/index.php?g=Home&m=Weixin&a=index&token=fnhmbx1402300980转换为:http://www.web.com/index.php/Home/Weixin/index/token/fnhmbx1402300980Nginx伪静态规则该怎么写?网站项目站点配置文件
server{
listen 80;
server_name web.com;
root /a/domains/weixin/public_html;
index index.html index.htm index.shtml index.php;
error_page 404 /404.html;
#自定义内容开始
#自定义内容结束
location = /500.html {
root /usr/share/nginx/html;
}
location ~ \.php$ {
fastcgi_pass unix:/dev/shm/php.sock;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
access_log /a/apps/nginx/logs/weixin.access.log main;
}
location ~ /\.ht {
deny all;
}
} 最佳答案