How can I rewrite my URL from this http://www.mydomain.com/myfolder/index.php?g=category&page=1 Code (markup): into something like this http://www.mydomain.com/myfolder/category/page1.html Code (markup): Thanks
Try this: RewriteRule ^myfolder/([A-Za-z0-9_A-Za-z0-9]+)/page(.+)\.html$ /myfolder/index.php?g=$1&page=$2 [NC] Code (markup): I haven't tried it but I think it should work. Good Luck
Sorry for my mistake, but the htaccess file will be placed under "myfolder" directory. How will I rewrite it?
This is how the rewrite rule would look if the .htaccess was placed under myfolder. Rewriteengine on RewriteRule ^([A-Za-z0-9_A-Za-z0-9]+)/page(.+)\.html$ http://mydomain.com/myfolder/index.php?g=$1&page=$2 [NC] Code (markup): If you already have the "RewriteEngine on" directive then don't add it twice. Just place the rewriterule underneath it. That should work for you. Good Luck!