title: Mod Rewrite - ignore catalog before string
body: <p>I have simple rewriting for blog articles using this directive</p>
  
  <pre><code>RewriteCond %{REQUEST_FILENAME} !-d [NC]
  RewriteCond %{REQUEST_FILENAME} !-f [NC]
  RewriteRule ^(.*)$ viewpost.php?aid=$1 [QSA,L]
  </code></pre>
  
  <p>It works as intended when using urls like</p>
  
  <pre><code>http://example.com/some-blog-title
  </code></pre>
  
  <p>Lately I added special category for some post and need it urls in form</p>
  
  <pre><code>http://example.com/categoryname/some-blog-title
  </code></pre>
  
  <p>So what I need is to use both types of url on site</p>
  
  <pre><code>http://example.com/some-blog-title
  </code></pre>
  
  <p>and</p>
  
  <pre><code>http://example.com/categoryname/some-blog-title
  </code></pre>
  
  <p>and both of them using viewpost.php?aid=$1 script. 
  Categoryname is just a word (product name). It wont change so it doesnt need to be dynamic. I want to use it simply for seo purpose. 
  So i need this directive to accept both types of url - with categoryname or without it.</p>