title: PHP rewrite links using .htaccess file
body: <p>Is there any nice function for PHP to use Apache's mod_rewrite to rewrite URLs? </p>
  
  <pre><code>$url="semantic/path/to/page";
  $url=mod_rewrite_url($url,"path/to/.htaccess");
  
  //$url is index.php?page_id=45
  </code></pre>
  
  <p>I had the idea of simply parsing .htaccess file and comparing it to the string with url, but I'm more interested in some built-in function, which I doubt that exists though.</p>