htaccess redirect url with language and page parameters
<p>I'm really lost in all the rules to redirect an htaccess and I can't find the perfect solution for my problem.
I'm trying to redirect my urls who looks like this :</p>

<pre><code>http://mywebpage.eu/path/to/site/LANGUAGE/PAGE
</code></pre>

<p>who should redirect to</p>

<pre><code>http://mywebpage.eu/path/to/site/index.php?lang=LANGUAGE&amp;page=PAGE
</code></pre>

<p>but sometime they could be like this without PAGE or LANGUAGE</p>

<pre><code>http://mywebpage.eu/path/to/site/LANGUAGE/
http://mywebpage.eu/path/to/site/PAGE/
</code></pre>

<p>who should redirect to</p>

<pre><code>http://mywebpage.eu/path/to/site/index.php?lang=LANGUAGE&amp;page=
http://mywebpage.eu/path/to/site/index.php?lang=&amp;page=PAGE
</code></pre>

<p>(all these examples could end with "<strong>/</strong>" or not)</p>

<p>When I finaly get a part of something who's working, all my css/images/js/include(php) are 404 errored because of the addition of that virtual subfolder "/LANGUAGE/"...</p>

<pre><code>RewriteEngine on
RewriteBase /path/to/site/

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([a-z]{2})/(.*)$ index.php?lang=$1&amp;page=$2 [L,QSA]
</code></pre>

<p><strong>Thanks a lot for your help.</strong></p>