Home > Article > Backend Development > 请问这个PHP伪静态怎么写?
我有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]