注册 | 登录 忘记密码? 51cto首页 | 博客 | 论坛 | 招聘
热点文章 小五思科技术学习笔记之SSH
 帮助

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


2007-11-14 16:57:51
 标签:apache 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>
四 保存httpd.conf并重启apache。




    文章评论
 
2007-11-14 21:47:23
什么哦/??不大了解

 

发表评论

昵   称:
验证码:  点击图片可刷新验证码  博客过2级,无需填写验证码
内   容: