nginx下配置url重写!解决思路
程序员文章站
2022-05-16 23:33:41
...
nginx下配置url重写!
hostname/infor/index.php?q=ssq
hostname/ssq_index.html
我想把上面的url重写成下面的形式,谢谢大家!
------解决方案--------------------
RewriteEngine On
RewriteBase /
RewriteRule ^([0-9_a-z]+)_index.html$ infor/index.php?q=$1 [L,R=301]
仅供参考
------解决方案--------------------
RewriteEngine On
RewriteRule ^(.*)_index.html$ /infor/index.php?q=$1 [L]
hostname/infor/index.php?q=ssq
hostname/ssq_index.html
我想把上面的url重写成下面的形式,谢谢大家!
------解决方案--------------------
RewriteEngine On
RewriteBase /
RewriteRule ^([0-9_a-z]+)_index.html$ infor/index.php?q=$1 [L,R=301]
仅供参考
------解决方案--------------------
RewriteEngine On
RewriteRule ^(.*)_index.html$ /infor/index.php?q=$1 [L]
相关文章
相关视频
上一篇: 扩展PHP的异常处理类_PHP教程
下一篇: SQL查询动态占位符
推荐阅读
-
IIS下配置页面重写(配合插件url-rewrite2去除页面后缀名)的实现方法
-
nginx配置url重写
-
Nginx下无法使用中文URL的解决方法
-
Nginx服务器下使用rewrite重写url以实现伪静态的示例
-
Nginx配置React项目Url后直接输入路由路径时报404问题的解决
-
linux下nginx不支持中文URL路径的解决方案
-
nginx 下安装配置 phpadmin报错的解决方法
-
IIS下配置页面重写(配合插件url-rewrite2去除页面后缀名)的实现方法
-
在phpstudy集成环境下的nginx服务器下配置url重写
-
nginx支持codeigniter的pathinfo模式url重写配置写法示例