0
我將網站上的舊網址重定向到其他網站上的新網址。它使用了宙斯網絡服務器,前兩條規則工作得很好。然而,它似乎並沒有與其中有查詢字符串的第三個網址...任何想法如何解決這個問題?看起來好像我可能需要一個正則表達式來處理特殊字符?
,因爲如果我把它從比賽中取出,它可以正常工作。謝謝使用正則表達式查詢字符串重定向網址
match URL into $ with ^/$
if matched
set OUT:Location = http://www.website.co.uk/
set OUT:Content-Type = text/html
set RESPONSE = 301
set BODY = Moved
goto END
endif
match URL into $ with ^/index.php$
if matched
set OUT:Location = http://www.website.co.uk/
set OUT:Content-Type = text/html
set RESPONSE = 301
set BODY = Moved
goto END
endif
match URL into $ with ^/index.php?cPath=1_50$
if matched
set OUT:Location = http://www.website.co.uk/categories.php?category=Boilers
set OUT:Content-Type = text/html
set RESPONSE = 301
set BODY = Moved
goto END
endif
是的,這是固定的。非常感謝。 – Cameron 2012-07-12 19:59:18