不懂的.htaccess 菜鸟求帮助

FLY 2011-05-18 10:01:48
代码如下
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^article/([0-9]+).html$ article.php?act=detail&id=$1 [L]
RewriteRule ^article/([0-9]+).html$ article.php?act=cate&cid=$1 [L]
</IfModule>

我对这个不懂,求帮忙....哪位能写个正确...感激不尽...
...全文
74 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
FLY 2011-05-19
  • 打赏
  • 举报
回复
[Quote=引用 1 楼 toury 的回复:]

这样试试,效果为article/ab-12.html
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule article\/([a-zA-Z]{1,})-([0-9]{1,}).html$ article.php?act=$1&id=$2
RewriteRule arti……
[/Quote]
大哥 ,太给力了....随便问下..翻页这个可以有么?
toury 2011-05-18
  • 打赏
  • 举报
回复
这样试试,效果为article/ab-12.html
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule article\/([a-zA-Z]{1,})-([0-9]{1,}).html$ article.php?act=$1&id=$2
RewriteRule article\/([a-zA-Z]{1,})-([0-9]{1,}).html$ article.php?act=$1&cid=$2
</IfModule>

24,923

社区成员

发帖
与我相关
我的任务
社区描述
Web 开发 Apache
社区管理员
  • Apache
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧