Re: localization folder for web site

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





Stut wrote:
On 13 Sep 2008, at 15:31, Alain R. wrote:
mostly (90%) websites are designed to include localization (made in php) folder like following:
www.mywebsite.com/en/
www.mywebsite.com/de/
www.mywebsite.com/fr/

why do they not use only 1 folder and use dynamically PHP to change localization of website ?
has this something to do with search engine rating ?

One would hope that unless it's a pretty small static site those "folders" actually map to the same place and generate pages in the required language.

The reason it's in the URI and not URI agnostic is indeed so that search engines can index multiple languages if they want to.

-Stut

ok so if i make a compilation of all information i have between headers and apache rewriterule i have a new issue.

let's take an example.

1. user types in his favorite browser www.website.com
2. www.website.com/index.php redirects user to www.website.com/en/welcome/ (index.php within /welcome) thanks the following command: header("Location: http://www.website.com/en/welcome/";); 3. however, as /en/welcome does not exist, apache sends an error message: The requested URL /se_internet/en/welcome/ was not found on this server.

even if i have in my .htaccess file:
RewriteRule ^/([A-Za-z0-9-]+)/welcome/$ /welcome/index.php?lang=$1 [NC,L]

4. user should at the end have in his browser address bar http://www.website.com/en/welcome but apache would reroute user to www.website.com/welcome/index.php?lang=en

so where is the problem ?
is there a problem with RewriteRule when you reroute only virtual folders ?

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux