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

WBOY
Release: 2016-06-23 13:24:16
Original
1031 people have browsed it

我有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] 

source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!