RewriteEngine On RewriteBase / RewriteCond %{REQUEST_URI} ^/?(.+)_(en-us|en|es|pt|de|fr|jp|it)?\.(html|htm|php$ RewriteRule ^(/)?.+ $1%1.%3?lang=%2&%{QUERY_STRING} [L] RewriteCond %{REQUEST_URI} ^/?(en-us|en|es|pt|de|fr|jp|it)?\.(html|htm|php)$ RewriteRule ^(/)?.+ $1?lang=%1&%{QUERY_STRING} [L] RewriteCond %{REQUEST_URI} ^/?(buy|order)_.+\.html$ RewriteRule ^(/)?buy_(.+)\.html $1?product=$2&%{QUERY_STRING} [L] RewriteRule ^(/)?order_(.+)\.html $1?category=$2&%{QUERY_STRING} [L] AddType application/x-httpd-php .php .htm DirectoryIndex index.php index.htm