View Full Version : Solved Bad redirect
Hi Michael, in Google webmaster tools i am having some bad redirects show up under the crawling, not found tab, 14,000 of them.
Here is an example.
http://www.example.com/forums/bg/f46/thread-title-24662/?hl=hi
A header checker says it 301 redirects to;
http://www.example.com/forums/hi/vbenterprisetranslator_seo.php
I do not know how google is finding these pages, but i am more concerned why they are 301 redirected to vbenterprisetranslator_seo.php
Do you have an htaccess suggestion so i can redirect them to the proper translated pages.
Thanks.
As I see you was using old translator mod. That is why Google remembers those links with hl=. Here you will find appropriate redirecting rule:
http://www.vbenterprisetranslator.com/forum/troubleshooting/6-faq.html#post13
I am already using that redirect, note these urls have both the directory /ar/ and ?hl=ar in the url so they are a combination of both mods urls.
This issue is not closed, wtf.
Relax :) Please give me your whole .htaccess file
# Comment the following line (add '#' at the beginning)
# to disable mod_rewrite functions.
# Please note: you still need to disable the hack in
# the vBSEO control panel to stop url rewrites.
SetOutputFilter DEFLATE
RewriteEngine On
#RewriteCond %{HTTP_USER_AGENT} ^msnbot [NC]
#RewriteRule .* - [F,L]
RewriteRule ^/?(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)/$ vbenterprisetranslator_seo.php?vbet_lang=$1&redirected=/forums/ [L,QSA]
RewriteRule ^/?(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)/(.*)?$ vbenterprisetranslator_seo.php?vbet_lang=$1&redirected=/forums/$2 [L,QSA]
RewriteCond %{QUERY_STRING} (hl=|language=)(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/%2/$1? [L,R=301]
RewriteRule ^((urllist|sitemap).*\.(xml|txt)(\.gz)?)$ vbseo_sitemap/vbseo_getsitemap.php?sitemap=$1 [L]
RewriteCond %{REQUEST_URI} !(admincp/|modcp/|vbseo_sitemap/|cron)
RewriteRule ^((archive/)?(.*\.php(/.*)?))$ vbenterprisetranslator_seo.php [L,QSA]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !^(admincp|modcp|clientscript|cpstyles|images)/
RewriteRule $ vbenterprisetranslator_seo.php [L,QSA]
# Some servers require the Rewritebase directive to be
# enabled (remove '#' at the beginning to activate)
# Please note: when enabled, you must include the path
# to your root vB folder (i.e. RewriteBase /forums/)
#RewriteBase /
RewriteCond %{REQUEST_URI} !(admincp/|modcp/|cron|vbseo_sitemap)
RewriteRule ^((archive/)?(.*\.php(/.*)?)?)$ vbseo.php [L,QSA]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !^(admincp|modcp|clientscript|cpstyles|images)/
RewriteRule ^(.+)$ vbseo.php [L,QSA]
Put hl= rule BEFORE vBET rules. This will solve the issue :)
Somehow I'm creating 1,000s of duplicate content pages.
site:www.computer-juice.com/ inurl:?hl=t - Google Search (http://www.google.com/search?hl=en&rlz=1C1CHMB_en-GB___GB312&q=site:www.computer-juice.com/+inurl:%3Fhl%3Dt&btnG=Search&aq=f&aqi=&aql=&oq=)
I am 301 redirecting these to the homepage.
How is google finding these junk URLs?
Is it because of the old mod?
Yes - the old one was generating links with hl= vBET was never making such links. And you had in wrong place your rule which have to redirect such old links. Now when you have it corrected Google will stay with appropriate link only. Of curse it can take some time for Google.
Right, but, google is finding pages with ?hl=t in them, t on it's own was never in either script.
How can I 301 redirect all query strings with "?hl=t" to my forum root please?
Put this rule before the others:
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]
Please test it!
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.
Sorry for confusion. It is obviously my fault - I miss this detail. Please use this rule before other rules (test it):
RewriteCond %{QUERY_STRING} hl=t
RewriteRule ^(.*)$ http://%{HTTP_HOST}/forums/ [L,R=301]
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 rule :)
Once again sorry for misleading ;)
Powered by vBulletin® Version 4.2.5 Copyright © 2026 vBulletin Solutions Inc. All rights reserved.