Clean URL using PHP or Apache redirect
<blockquote>
  <p><strong>Possible Duplicate:</strong><br>
  <a href="http://stackoverflow.com/questions/2267488/redirect-php-to-clean-url">Redirect *.php to clean URL</a>  </p>
</blockquote>



<p>I am sure this has been asked here before, but for some reason whatever I am trying doesn't seem to work.</p>

<p>What I have is:
<a href="http://example.com/share/edit.php?id=59" rel="nofollow">http://example.com/share/edit.php?id=59</a></p>

<p>What I want is:
<a href="http://example.com/share/59" rel="nofollow">http://example.com/share/59</a></p>

<p>My <code>.htaccess</code> is:</p>

<pre><code>RewriteEngine on
RewriteRule ^share/([0-9]+)$ share/edit.php?id=$1
</code></pre>

<p>Is there something I am doing wrong? The <code>.htaccess</code> file is in <code>example.com/share</code> directory.</p>
