I'm starting to develop a general basis for multi language sites, so I don't have to develop it again and again every time I need it.
My idea is to have a file called handler.php which is connected to the 404 event in a .htaccess file.
All other files are in the root folder, like contact.php.
When I want a english version of the contact.php I call /en/contact.php. Because the /en folder doesn't exists, it calls the handler.php. This should execute a regex over the redirect_url to get the language and the file called.
Question 1: Is this a smart way to handle, or are there better ones?
Question 2: How do I get the POST and GET vars in the handler.php right, like it would just as the file handler.php was called directly.
Hope this is an understandable story
Thanks in advance.
Greetz Jolly.