How can I 301 redirect all query strings with "?hl=t" to my forum root please?
How can I 301 redirect all query strings with "?hl=t" to my forum root please?
Put this rule before the others:
Please test it!Code:RewriteCond %{QUERY_STRING} hl=(af|sq|ar|be|bg|ca|zh-CN|hr|cs|da|nl|en|et|tl|fi|fr|gl|de|el|iw|hi|hu|is|id|ga|it|ja|ko|lv|lt|mk|ms|mt|no|fa|pl|pt|ro|ru|sr|sk|sl|es|sw|sv|zh-TW|th|tr|uk|vi|cy|yi) RewriteRule ^(.*)$ http://%{HTTP_HOST}/forums/ [L,R=301]
I DO NOT want to redirect all those urls, I WANT to redirect ONLY query strings with ?hl=t to my root.
I dont not want to rediret the old mod urls to the root, i am happy redirecting them to the new mod folder urls.
I dont think you are understanding the problem.
Last edited by Snake; 14-03-10 at 21:41.
Sorry for confusion. It is obviously my fault - I miss this detail. Please use this rule before other rules (test it):
This one will redirect all requests with ?hl=t to your forum root. If you want redirect to root of your whole service, then remove /forums from ruleCode:RewriteCond %{QUERY_STRING} hl=t RewriteRule ^(.*)$ http://%{HTTP_HOST}/forums/ [L,R=301]
Once again sorry for misleading![]()