Forum Moderators: phranque
i can certainly see the benefit of people searching for some info and then having google translate it, but what i don't like is the fact that they rewrite all of my urls at the same time, so every time the user visits another page that becomes translated too.
that might be very handy for them, but it means that all my ads become redundant, because they are all in english.
so i was wondering, is there any way to check whether the url has been rewritten and redirect them to the correct url if they follow a link?
i have tried the <base href="blah"> tag but that doesn't make any difference.
does anyone know a way of checking the cutrrent url and rewriting it with javascript?
As far as the issue you're mentioning with the base element I have only recently started using it in my personal site's nightly builds about a month or two ago. I would probably just check the referrer in PHP like I do with localhost versus my domain name/extension.
- John
I would probably just check the referrer in PHP like I do with localhost versus my domain name/extension.
that is along the same lines as i was thinking. i currently use this little php script on every page, which redirects
www.example.com/index.html
to
www.example.com/
(i don't have access to the .htaccess file, in case you're wondering)
function fix_index_url(){
if(preg_match('#(.*)index\.(html¦php)$#',$_SERVER['REQUEST_URI'],$captures)){
header('HTTP/1.1 301 Moved Permanently');
header('Location: '.$captures[1]);};}
fix_index_url(); (remember to replace the broken pipe with a complete pipe!)
is there a way of rewriting it so that it strips out anything before http://www.example.com?
the google url looks something like this
[64.233.179.104...]
but it could change, depending on which language they picked. so it would have to strip out any number of characters before http://www.example.com
come to think of it, this might be quite a handy thing to do anyway, even without the translating problem. because isn't there some kind of proxy site attack which grafts your url onto the end of theirs, and duplicates your content?
P.S. I question the premise that "all my ads become redundant, because they are all in english", and I don't see how suppressing translation would improve anything.