http://example.com/module/controller/action/key1/value1/key2/value2.html
// 这个才是正宗的 URL,上面那个是冒牌的 http://example.com/index.php?m=module&c=controller&a=action&key1=value1&key2=value2
<scheme>://<user>:<password>@<host>:<port>/<path>;<params>?<query>#<frag>
http://example.com/module/controller/action/key1/value1/key2/value2.html
http://example.com/index.php/module/controller/action/key1/value1/key2/value2.html
# 如果请求的文件不存在,则进行 URI 重写
# 在原有的基础上添加入口文件 index.php
if (!-e $request_filename) {
rewrite ^/(.*)$ /index.php/$1 last;
}
location ~ ^(.+\.php)(.*)$ {
root /var/www/html/$vhost_path;
fastcgi_pass phpfpm:9000;
fastcgi_split_path_info ^(.+\.php)(.*)$;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param PATH_INFO $fastcgi_path_info;
include fastcgi_params;
}
server {
listen 80;
server_name tp5.loc;
set $vhost_path tp5/public;
location / {
root /usr/share/nginx/html/$vhost_path;
index index.php index.html index.htm;
if (!-e $request_filename) {
rewrite ^/(.*)$ /index.php/$1 last;
}
}
location ~ ^(.+\.php)(.*)$ {
root /var/www/html/$vhost_path;
fastcgi_pass phpfpm:9000;
fastcgi_split_path_info ^(.+\.php)(.*)$;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param PATH_INFO $fastcgi_path_info;
include fastcgi_params;
}
}
机械节能产品生产企业官网模板...
大气智能家居家具装修装饰类企业通用网站模板...
礼品公司网站模板
宽屏简约大气婚纱摄影影楼模板...
蓝白WAP手机综合医院类整站源码(独立后台)...苏ICP备2024110244号-2 苏公网安备32050702011978号 增值电信业务经营许可证编号:苏B2-20251499 | Copyright 2018 - 2025 源码网商城 (www.ymwmall.com) 版权所有