Possible Duplicate:
Redirect *.php to clean URL
I am sure this has been asked here before, but for some reason whatever I am trying doesn’t seem to work.
What I have is:
http://example.com/share/edit.php?id=59
What I want is:
http://example.com/share/59
My .htaccess is:
RewriteEngine on
RewriteRule ^share/([0-9]+)$ share/edit.php?id=$1
Is there something I am doing wrong? The .htaccess file is in example.com/share directory.
If the .htaccess is in the share directory then you don’t need to specify the URL path. Try something like this:
It also goes without saying that should you be using apache you will need mod_rewrite enabled.