0
我有一個WordPress網站,需要重定向一些URL基於查詢字符串。需要幫助使用mod_rewrite重定向一些URL的查詢字符串
的聯繫是/?product_brand=brandname
我需要將它們全部重定向到/?product_bisbrand=brandname
有人點我在正確的方向嗎?
我有一個WordPress網站,需要重定向一些URL基於查詢字符串。需要幫助使用mod_rewrite重定向一些URL的查詢字符串
的聯繫是/?product_brand=brandname
我需要將它們全部重定向到/?product_bisbrand=brandname
有人點我在正確的方向嗎?
嘗試把你的文檔根這個地方在htaccess文件合適:
RewriteEngine On
RewriteCond %{QUERY_STRING} (.*)product_brand=([^&]+)&?(.*)
RewriteRule ^(.*)$ /$1?%1product_bisbrand=%2&%3 [R=301,L]