In my application's .htaccess
file I have the following:
Options -Indexes
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.+) index.php
A very lightweight file that puts all unmatched requests through index.php
.
However, this application is a social networking website that I've been tasked with making multi-lingual. Therefore, URLs like www.example.com/profile/martin
need to be converted in to say, Spanish, and will therefore become www.example.com/perfil/martin
.
Therefore, my question is: is it possible to rewrite a RewriteRule
? In this instance, I want to rewrite /perfil/martin
to /profile/martin
, but then have /profile/martin
passed to index.php
.