douzhang1852
2014-02-21 08:02
浏览 41
已采纳

如何使用.htaccess重定向到另一个URL后重写URL

I have problem to redirect page in paging system. I have write .htaccess as follows.

RewriteRule ^news.html?page=2 allnews.php?type=1&page2 [NC]
RewriteRule ^news.html allnews.php?type=1 [NC]

Actually I want to add paging system in the news.html. But it is not working :(

Please help me.

图片转代码服务由CSDN问答提供 功能建议

我在分页系统中重定向页面时遇到问题。 我写了.htaccess如下。

  RewriteRule ^ news.html?page = 2 allnews.php?type = 1& page2 [NC] 
RewriteRule ^ news.html allnews  .php?type = 1 [NC] 
   
 
 

实际上我想在news.html中添加分页系统。 但它不起作用:(

请帮助我。

  • 写回答
  • 好问题 提建议
  • 关注问题
  • 收藏
  • 邀请回答

1条回答 默认 最新

  • dongma1666 2014-02-21 08:10
    已采纳

    Probably final URI should be allnews.php?type=1&page=2 instead of allnews.php?type=1&page2.

    RewriteEngine On
    
    RewriteRule ^news\.html$ /allnews.php?type=1 [NC,QSA]
    
    已采纳该答案
    评论
    解决 无用
    打赏 举报

相关推荐 更多相似问题