Home  >  Article  >  Backend Development  >  请问这个PHP伪静态怎么写?

请问这个PHP伪静态怎么写?

WBOY
WBOYOriginal
2016-06-23 13:24:161080browse

我有PHP文件10个,形如a1.php a2.php ......a9.php a10.php ,请问怎么用一条伪静态规则,来实现访问a1.php为a1.html......,可不可以就一条规则实现??
我记得分类规则是这样写的:
RewriteRule ^xxx/pad_([0-9]+)\.html xxx\.php\?page=$1 [L,NC] ,我上面那个怎么实现呢?谢谢解答!


回复讨论(解决方案)

试试这样
RewriteRule ^/(a[0-9]+)\.html /$1.php  [L,NC] 

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