i want an .htaccess rewrite
so /en/home pulls /home /es/stuff.php pulls /stuff.php /fr/something/thisis.php pulls /something/thisis.php
without it being visible in the url.
i want an .htaccess rewrite
so /en/home pulls /home /es/stuff.php pulls /stuff.php /fr/something/thisis.php pulls /something/thisis.php
without it being visible in the url.
Something like this
RewriteRule ^([a-z]{2})/(.*) $2 [L,NC]
If you want to store the current language as a query-string value, try this
RewriteRule ^([a-z]{2})/(.*) $2?lang=$1 [L,NC,QSA]
If you use the second method, you can access the language in PHP like so:
$language = (preg_match('/^[a-z]{2}$/i', $_GET['lang']) ? $_GET['lang'] : 'en');
Try
RewriteRule ^/.{2}/(.*)$ /$1 [QSA,L]
This will remove all 2 letter first directories