Re: localization folder for web site

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

 



Alain R. wrote:

Stut wrote:
On 14 Sep 2008, at 20:27, Alain R. wrote:
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.


...

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


Are you using the [R] flag in your RewriteRule? This causes the server to issue a redirect--inform the browser that it needs to make a new request to the given URL. Thus, you'll see the new URL in the browser location bar. This is not what you want. Instead, you should just have mod_rewrite silently change the request.

You'll probably only need the [L] flag, though you really should post you Rewrite Rule here.

b

--
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