Re: localization folder for web site

From: Date: Sun, 14 Sep 2008 23:52:13 +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-280140@lists.php.net to get a copy of this message
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

« previous php.general (#280140) next »