I am writing a multilingual site. I have several files on the server, for example:
/index.php
/files.php
/funny.php
And I would like to add language support by putting the language code in the URL as follows:
http:
will be redirected to:
http:
AND
http:
will be redirected to:
http:
I would like to add more languages, for example:
http:
And I would like this to work only for files with the php and php5 extension. The rest of the files should be the same as them.
So, for example, when I get to the address
http:
I want my PHP to know that the current path
http:
and NOT
http:
This is necessary for me because in my PHP code I am in the current path and would like them to work while they work.
Could you please write how to prepare the htaccess file on Apache to meet these criteria?