I am having some trouble getting mod-rewrite rules in my .htaccess file to work like I need them to.
I am trying to translate web requests made from:
http://www.masterongspropshop.com/blog/22
To:
.../blog.php?idPost=22
When I try, the URL always reverts to .../blog?idPost=22
. I have tried a couple of different variations but all of them seem to end with a similar result.
The rewrite rules currently look like this:
RewriteRule ^blog$ blog.php [L] RewriteRule ^blog/([0-9]*)$ blog.php?idPost=$1 [L,QSA]
Enable mod_rewrite and .htaccess through
httpd.conf
and then put this code in your.htaccess
underDOCUMENT_ROOT
directory: