You are here: Re: Multi language site with PHP, mysql and cookies - how about search engines? « PHP Programming Language « IT news, forums, messages
Re: Multi language site with PHP, mysql and cookies - how about search engines?

Posted by Erwin Moller on 04/09/07 12:30

CAH wrote:

> Hi
>
> I need to make at multilanguage language site, and for that I need to
> identify the users, and register there choice off language. For that i
> imagine using cookies, since this is the only way to identify the
> users. But from what I read search engines ignore cookies, and at the
> same time I would like the users to be able to send links in there
> choice of language to there friends, so I would like this sort of url
> scheme.
>
> www.site.com/en/
> www.site.com/de/
> www.site.com/fr/
> ....
>
> But I don´t like the idea of having a lot of duplicate files, with the
> only difference being a reference to a specific column in my sql
> database. What to do? How do others solve these problems?

With mod_rewrite.

With that you can setup Apache to do this:
1) incoming URL:
www.site.com/en/page1.php
to
www.site.com/page1.php?lang=en

You can set up your own rules (using regular expression).

In that way you do not have to really create all these pages, but they
become virtual.
You only have to make page1.php pick up the $_GET["lang"] and make decisions
for your query based on that.


Regards,
Erwin Moller

>
> Thanks for any advice
> CAH
> PS There is no reason to set up some sort of login, it would be to big
> a burden on the user for this kind of site.)
> www.winches.dk

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация