Hello
i am pretty new on the programming. i have encounter problem for the following. please kindly advise
i have website with
www.mysite.com/products.php?cid=3
which the last number 3, generated from backend database, ranged 1-3
i want to have it rewrite so that when people type:
www.mysite.com/nike will be directed to www.mysite.com/products.php?cid=1
www.mysite.com/reebok will be directed to www.mysite.com/products.php?cid=2
www.mysite.com/kswiss will be directed to www.mysite.com/products.php?cid=3
etc.....
i have the text file named category.txt under the root:
nike 1
reebok 2
kwiss 3
and .htaccess
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteMap categorymap txt:/image/categorymap.txt
RewriteRule ^(.*) /products.php?cid=${categorymap:$1|NOTFOUND} [PT]
</IfModule>
however it does not work. can you please advise