Apache伪静态html(URL Rewrite)设置法

比如我们有新闻页:/news/readmore.php?id=4875
我们要做成静态页:/news/top2007,4875.html
 
一 打开 apache 的配置文件 httpd.conf 。
二 将#loadmodule rewrite_module modules/mod_rewrite前面的#去掉
三 在 httpd.conf中添加:
<ifmodule mod_rewrite.c>
 RewriteEngine On
 RewriteRule /news/top2007,(\d+).html$   /news/readmore\.php\?id=$1
</ifmodule>
原文地址:https://www.cnblogs.com/zhangwei595806165/p/2836813.html