Re: localization folder for web site
| From: | Stut | Date: | Sun, 14 Sep 2008 21:39:15 +0000 |
| Subject: | Re: localization folder for web site | ||
| References: | 1 2 3 4 5 6 7 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-280135@lists.php.net to get a copy of this message | ||
On 14 Sep 2008, at 20:53, Alain R. wrote:
Stut wrote:Show us what you're trying to use. Without that we really can't help. -Stut -- http://stut.net/On 14 Sep 2008, at 20:27, Alain R. wrote:sorry Stut, i maybe miss the point here but i rewrite the rule, however when user request is http://yoursite.com/en/index.php, the browser address bar shows http://yoursite.com/index.php?lang=en :-( and not only http://yoursite.com/en/index.php this is my problem :-)but in this case, my browser address bar will show me : whatever.php?l=en for example. and this is not what i want. I want that browser shows in its address bar /en/whatever, but the page whatever.php will get the parameter l=en. so how can i do that ?You're still not getting it, so here it is step by step... * User request http://yoursite.com/en/index.php * Apache sees this request, matches the URL to a rewrite rule and *internally* rewrites the request so it looks like http://yoursite.com/index.php?lang=en - note that the browser does not get told anything about this process. * The index.php script runs, reads $_GET['lang'] to see what language has been requested and generates the page as normal. Whenever it creates a URI it ensures that it's created so it starts with '/'.$_GET['lang'].'/...' to ensure the user continues with the same language. Hope that makes sense. Now, please Google mod_rewrite, have a play with it on a local test server and try it. If you don't get it from the words, get it from the play! -Stut