Forum Moderators: phranque

Message Too Old, No Replies

Translation sites -- like them, or loathe them?

how do you stop them rewriting your urls?

         

londrum

9:08 pm on Sep 19, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



do you encourage or discourage translation services like google's, and altavista's babelfish?

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?

JAB Creations

5:16 pm on Sep 20, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I provide translation links for as many languages as possible. The main problem is that they continuously all change the URLs which makes it a pain to update frequently. Otherwise people would have to manually enter in the URL. This isn't going to click with most non-English visitors because I have it so they can just click on their flag. When they come to my site that's English but see a bunch of flags they tend to (by access logs) take a moment to find their flag.

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

Frida

1:37 pm on Sep 21, 2007 (gmt 0)

10+ Year Member



when it comes to long texts the results are meaningless! Period.

londrum

6:41 pm on Sep 21, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



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?

JAB Creations

1:22 am on Sep 22, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I'm not good enough with PHP to help you out with that. I also wouldn't recommend redirecting people who are visiting the translated part of your site as they would be more knowledgeable and thus a bit more offended that they weren't allowed the read your page as they would prefer.

- John

jomaxx

6:31 am on Sep 22, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I agree, just let the translation service do its job. The only practical way I can imagine overriding it is to write out the links via Javascript, but it would be a lot of work just to disrupt the functionality of a service that the surfer evidently needs.

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.