title: mod_rewrite takes the rewritten URL as the base one
body: <p>My .htaccess</p>
  
  <pre><code>RewriteEngine On
  Options +FollowSymlinks
  
  RewriteRule ^posts/(.*)/(.*)/$ index.php?mod=posts&amp;action=cat&amp;cat=$2
  RewriteRule ^post/(.*)/(.*)/$ index.php?mod=posts&amp;action=read&amp;id=$2
  </code></pre>
  
  <p>When I point the browser to <a href="http://my-dev-server/posts/some-category/1/" rel="nofollow noreferrer">http://my-dev-server/posts/some-category/1/</a> the first RewriteRule is triggered and everything goes fine.
  But then there I have a link like this one</p>
  
  <pre><code>&lt;a href="post/post-title/10/"&gt;&lt;/a&gt;
  </code></pre>
  
  <p>If I click that link it takes me to </p>
  
  <pre><code>http://my-dev-server/posts/some-category/1/post/post-title/10/
  </code></pre>
  
  <p>And it should be</p>
  
  <pre><code>    http://my-dev-server/post/post-title/10/
  </code></pre>
  
  <p>It is following the pattern of the first RewriteRule which is obviously wrong</p>
  
  <p>What I am doing wrong here and how do I fix it without having to write absolute URLs?</p>