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.

  • 写回答

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]
    
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?