簡體   English   中英

使用.htaccess重定向到另一個URL后如何重寫URL

[英]How to rewrite URL after redirect to another url using .htaccess

我在頁面調度系統中重定向頁面時遇到問題。 我寫了.htaccess如下。

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

實際上,我想在news.html中添加分頁系統。 但這不起作用:(

請幫我。

最終的URI可能應該是allnews.php?type=1&page=2而不是allnews.php?type=1&page2

RewriteEngine On

RewriteRule ^news\.html$ /allnews.php?type=1 [NC,QSA]

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM