I have a site where my pages are generated dynamically. I want to change the url from:
http://www.mydomain.com/library.php?id=13
to something like:
http://www.mydomain.com/13.html
I am using this Rewrite Rule:
RewriteEngine On RewriteRule ^([^/]*)\.html$ /library.php?id=$1 [L]
Unfortunately it doesn’t work. When I click on the link the page goes to this url:
www.mydomain.com/library.php?id=13
But the strange part is when I browse to www.mydomain.com/13.html the link is working.
What am I missing?
You need to change the links that are generated in the library.php files to your new defined format 🙂