 <p>Change your last rule to this,</p> <pre><code># If the request is not for a valid directory RewriteCond %{REQUEST_FILENAME} !-d # If the request is not for a valid file RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^([a-z]+)/$ home/index.php?nLang=$1 [L,QSA,NC] </code></pre> <p>That way it will only handle language parameter e.g. <code>/it/</code> or <code>/en/</code> but will let other URLs e.g. <code>/it/dummy/</code> go to 404 handler. </p>