1
我有三個站點,共享相同的代碼的RewriteCond PARAM共享多個重寫規則
abc-local.org,abc-dev.org,abc.org
要在幾個URL重定向到一個子域的位置該網站
# Redirect Handles
RewriteCond %{HTTP_HOST} ^(.*)\.abc(.*).org [NC]
RewriteRule ^test1$ http://admin.abc%2.org/test1 [R=301]
RewriteRule ^test2$ http://admin.abc%2.org/test2 [L]
第一條規則獲取%2的值,第二條不是!
有沒有一種方法可以實現這一點,而無需爲每個規則編寫單獨的條件。
這工作正常,僅有1規則,謝謝 –