[英]htaccess permanent redirect with query string in url
如何重定向此頁面:example.com/index.php?option=1&view=news到此/ news
我打的很簡單
Redirect /index.php?option=1&view=news /news
但它不起作用
您需要使用mod_rewrite
來匹配查詢字符串:
RewriteEngine On
RewriteCond %{THE_REQUEST} /index\.php\?option=1&view=news [NC]
RewriteRule ^ /news? [R=301,L]
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.