欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  后端开发

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]
nginx下配置url重写!解决思路

声明:本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn核实处理。

相关文章

相关视频