php - modrewrite/htaccess - force default language in url -


i'm struggling modrewrite/htaccess problem (using php). i'm running multi-language web has urls www.mydomain.com/en/index.php "en" translate &lang=en

now i'm looking way force english default language url- eg. if user tries accessing url www.mydomain.com/dashboard.php, should automatically translate www.mydomain.com/en/dashboard.php

any ideas how solve this? thanks

assuming have list of languages site supports:

rewritecond %{request_uri} !^/(en|fr|es|de)/ rewriterule ^(.*)$ en/$1 [r] 

this rewrite url if doesn't start either /en/, /fr/, /es/ or /de/.


Comments

Popular posts from this blog

curl - PHP fsockopen help required -

HTTP/1.0 407 Proxy Authentication Required PHP -

c# - Resource not found error -