Apache伪静态html(URL Rewrite)设置
时间:2007-11-22 来源:whxy5
比如我们有新闻页:/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> 四 保存httpd.conf并重启apache。
我们要做成静态页:/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> 四 保存httpd.conf并重启apache。
相关阅读 更多 +