nginx下配置url重写!
hostname/infor/index.php?q=ssq
hostname/ssq_index.html
我想把上面的url重写成下面的形式,谢谢大家!
[解决办法]
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^([0-9_a-z]+)_index.html$ infor/index.php?q=$1 [L,R=301]
</IfModule>
仅供参考
[解决办法]
RewriteEngine On
RewriteRule ^(.*)_index.html$ /infor/index.php?q=$1 [L]