The url called: http://server.com/l/eng/a/emailform The url it should transform into: http://server.com/index.php?lang=eng&action=emailform The rewrite code in .htaccess: RewriteEngine On RewriteBase / RewriteCond %{THE_REQUEST} /l/(.*)/a/(.*)/\?(.*) RewriteCond %{REQUEST_URI} !/index\.php$ RewriteRule . /index.php?lang=/%1&action=%2&%3 [QSA,L] The error in the apache log: File does not exist: /home/user/public_html/l The error in the browser: The requested URL /l/eng/a/emailform was not found on this server.