I have just started learning htaccess.
And i want to test one page :
I have one folder called "favs" and inside that i have a php file index and from that i am passing to the page gallery.php with querystring ID
so the url will be :
mainsite.com/favs/gallery.php?id=7
Now i want the url to be like :
mainsite.com/favs/7
and this is the code i write in .htaccess file :
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule ^([a-zA-Z0-9_-]+)$ gallery.php?id=$1
RewriteRule ^([a-zA-Z0-9_-]+)/$ gallery.php?id=$1
</IfModule>