htaccess - 重写这个网址

时间:2012-12-17 21:11:11

标签: .htaccess rewrite

我正在努力使用我的htaccess URL重定向。 URL如下..

  

http://domain.com/comments/25/list/2

  • comments / 25 - 25是帖子的ID
  • list / 2 - 2是我需要从
  • 分页的页码

上一页我有以下内容。

  

RewriteRule ^ channels / list /([a-z0-9] +)$ index.php?page = channels& part = $ 1 [L]

所以基本上,需要重写2个变量,我很难做到这一点。对不起,我无法解释得更好:(

1 个答案:

答案 0 :(得分:0)

  

RewriteRule ^ comments /([0-9] +)/ list /([0-9] +)$   /index.php?comments=$1&list=$2 [L]