mod_rewrite: Rename filenames based on language

I have a bilingual website both in English and German. Both versions are served from the same root files like index.php, projects.php, people.php, etc.

The English versions are called via

http://myexample.com/en/index.php
http://myexample.com/en/projects.php
http://myexample.com/en/people.php

The German versions are called via

http://myexample.com/de/index.php
http://myexample.com/de/projects.php
http://myexample.com/de/people.php

For SEO reasons I like the German filenames to be Germanized:

de/projects.php -› projekte.php
de/people.php   -› leute.php

Can anybody help out?


Source: .htaccess

Leave a Reply