title: .htaccess RewriteCond small issue
body: <p>thanks to @Ωmega, I almost completely resolved my former issue (details here <a href="https://stackoverflow.com/questions/12327059/htaccess-regular-expression-issue">.htaccess regular expression issue</a>) and came to this solution :</p>
  
  <pre><code>RewriteCond %{REQUEST_FILENAME} !-d
  RewriteCond %{REQUEST_FILENAME} ^(.*/|)(en|de|fr)(/|)$ [NC]
  RewriteCond %1%3index.php -f
  RewriteRule ^(.*/|)(en|de|fr)(/|)$ index.php?lang=$2 [NC,QSA,L]
  
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteCond %{REQUEST_FILENAME} ^(.*/|)(en|de|fr)(/.*|)$ [NC]
  #RewriteCond $1$3.php -f
  RewriteRule ^(.*/|)(en|de|fr)(/.*|)$ $1$3.php?lang=$2 [NC,QSA,L]
  </code></pre>
  
  <p>Basically, these lines will rewrite anything in the form of <code>domain/language/sub/.../somepage</code> to <code>domain/sub/.../somepage.php?lang=language</code>. The first block is for urls in the form of <code>domain/language/</code>, with or without an ending <code>/</code> which is redirected to <code>index.php</code>.</p>
  
  <p>This works very well tho two small glitches remain which are :</p>
  
  <ol>
  <li><p>The 3rd line in the second block (I #commented it) just doesn't match, no matter what. The strange part is that it DOES work on the 4th line, ie my page actually displays fine. Does that mean the <code>-f</code> parameter is wrong here ?</p></li>
  <li><p>If I input any url ending with a <code>/</code> (second block only, it DOES work with the index file), my rewrite is broken ie outputs as <code>domain/language/sub/.../<b>somepage/.php</b></code> Is there any way to exclude a potential <code>/</code> in the inputed url with the regexp ?</p></li>
  </ol>
  
  <p>Thank you for your feedback !</p>