Currently I can hide the .php extension in the URL with my .htaccess file with this code:
RewriteEngine on
# Rewrite /foo/bar to /foo/bar.php
RewriteRule ^([^.?]+)$ %{REQUEST_URI}.php [L]
So an url like this: url.com/prices.php
currently looks like: url.com/prices
That's great, but i would like to look like this: url.com/en/prices
instead of this: url.com/prices?lang=en
I tried for an hour, searched for any types of the internet, i can do these separate, but not together. Thanks for any help :)
UPDATE: also, it would be great, that if they opens the index page (http://url.com) it would be immediately changed in the url to: http://url.com/en (or to the other languages of course, based on their browser language)
UPDATE2: At the moment my solution for languages: i set a cookie for the user, and use $language=$_COOKIE["language"];
They can choose the language in the menu