Topic: Mod Rewrite doesn't work
I have a bunch of URL formats that I'd like to make them search engine friendly. They are, for example:
http://localhost/?show=media&cid=1
http://localhost/?show=pages&cid=1&pages_id=2&detail
I tried to use this .htaccess code below but it didn't work.
RewriteEngine On
RewriteBase /ms
Options +FollowSymLinks
RewriteRule ^([^/]+)/$ index.php?show=$1
RewriteRule ^([^/]+)/([0-9]+)/$ index.php?show=$1&cid=$2
RewriteRule ^([^/]+)/detail/([0-9]+)/([0-9]+)/$ index.php?show=$1&cid=$2&pages_id=$3&detail=1
RewriteRule ^gallery/detail/([0-9]+)/([0-9]+)/$ index.php?show=gallery&cid=$1&gallery_id=$2&detail=1
RewriteRule ^polling/result/([0-9]+)/([0-9]+)/$ index.php?show=polling&cid=$1&polling_id=$2&results=1
RewriteRule ^polling/vote/([0-9]+)/([0-9]+)/$ index.php?show=polling&cid=$1&polling_id=$2&votes=1
RewriteRule ^gallery/image-detail/([0-9]+)/([0-9]+)/([0-9]+)/$ index.php?show=gallery&cid=$1&gallery_id=$2&gallery_images_id=$3&detail=1
RewriteRule ^artist/detail/([0-9]+)/$ index.php?show=artist&pages_id=$1&detail=1
RewriteRule ^news/comment/([0-9]+)/edit/$ index.php?show=comments&comment_id=$1&edit=1&stype=news
RewriteRule ^news/comment/([0-9]+)/delete/$ index.php?show=comments&comment_id=$1&delete=1&stype=news
RewriteRule ^albums/comment/([0-9]+)/edit/$ index.php?show=comments&comment_id=$1&edit=1&stype=albums
RewriteRule ^albums/comment/([0-9]+)/delete/$ index.php?show=comments&comment_id=$1&delete=1&stype=albums
I'm sure that mod_rewrite is working, as I test it using a simple redirect rule such as:
RewriteRule ^index\.php index.html
in other directory, and it worked fine.
I'm guessing that the problem is in the rewrite rules, but I ran out ideas to find the solution. I tried to google, and read a bunch of articles and postings with no luck. I even tried to generate the rules using an online rewrite generator, but still doesn't work.
Thanks in advance.