title: rewiteRule .haccess convert from one url directory to url paramter
body: <p>hello people I want to convert from this</p>
  <pre><code>http://www.example.com/10/slug-of-product/lang=EN
  </code></pre>
  <p><strong>/10/</strong> it' required</p>
  <p><strong>/slug-of-product/</strong> optional</p>
  <p><strong>lang=EN</strong> optional</p>
  <p>if the above url is entered and there is not file or directory with this URL I want
  to get run this</p>
  <pre><code>http://www.example.com/view.php?id=10&amp;slug=slug-of-product&amp;lang=EN
  </code></pre>
  <p>this what I tried so far</p>
  <pre><code># if not file
  RewriteCond %{REQUEST_FILENAME} !-f
  # if not directory
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteRule ^([0-9]+)/([a-z]+)/lang=([a-z]+)/?$ view.php?pn=$1&amp;slug=$2&amp;lang=$3 [QSA,L]
  </code></pre>
  <p><strong>problem!</strong>
  not working</p>
  <p>the site can't load any file like images ...</p>
  <p>cus I don't have those diractories</p>