Home  >  Article  >  Backend Development  >  新手 伪静态规则编写

新手 伪静态规则编写

WBOY
WBOYOriginal
2016-06-13 11:54:301262browse

新手求救 伪静态规则编写
大家好,我对正则不熟悉 现在有个动态的网站希望大家帮助编辑下apache伪静态规则 

gzdt/tzshow.php?id=1      变成 gzdt/tz-1-1.html
gzdt/tzshow.php?id=2      变成 gzdt/tz-2-1.html
-----------------------------------------------------------
gsxwshow.php?id=1     变成 gzdt/gsxw-1-1.html
yyjsshow.php?id=12    变成gzdt/yyjs-12-1.html
------------------------------------------------------------

还有几个一样的就不写了 谢谢大家

新手没那么多分了
------解决方案--------------------
上面的少写了应该是RewriteRule gzdt/tz-(\d+)-1\.html$   gzdt/tzshow.php?id=$1 
------解决方案--------------------
RewriteEngine on 加了嗎?

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn