nginx url重写
程序员文章站
2024-01-05 14:02:28
...
html|htm伪静态 无 location ~ \.(html|htm)$ {if ( !-e $request_filename ) { rewrite "^/(.+/)?([a-z-A-Z-0-9]+)(_[a-z-A-Z-0-9]+)*.(html|htm)$" /$1index.php?module=$2action=$3 last;}}
html | htm 伪静态
location ~ \.(html|htm)$ { if ( !-e $request_filename ) { rewrite "^/(.+/)?([a-z-A-Z-0-9]+)(_[a-z-A-Z-0-9]+)*.(html|htm)$" /$1index.php?module=$2&action=$3 last; } }
推荐阅读
-
请教yii2的url rules如何配置id为字符串格式的路由?
-
Linux+Nginx+MySQL下配置论坛程序Discuz的基本教程_PHP
-
allow_url_include的应用和解释_PHP
-
Symfony2实现在controller中获取url的方法,symfony2controller
-
centos7 yum 方式安装nginx centos7.2 centos 7.0 centos 6.7
-
求援:nginx+php中文总是乱码
-
nginx 最简cache配置
-
php如何获取url参数信息?
-
allow_url_include的应用和解释_PHP教程
-
用浏览器到Nginx服务器这中间到底发生了什么?