-3

I have tried using this code:

Rewrite Rule    ^products/([0-9]+)/?$    add-category/?cid=$1    [NC,L]   

But it is not working.

My url is http://webmicrodemo.com/haraz/ad-category/index.php?cid=9

and I want to change it to http://webmicrodemo.com/haraz/cat/9

baldrs
  • 2,132
  • 25
  • 34
ayaz321
  • 1
  • 3
  • 1
    This can have like 1 million causes, one of which is that mod_rewrite is not installed at all, so .htaccess files are ignored. Please improve your question by 1) checking if everything is installed correctly, and 2) what you have tried and what the results where (server errors? Which ones? redirect loops?) – jberculo Nov 10 '14 at 09:50
  • Read this: http://stackoverflow.com/q/20563772/476 – deceze Nov 10 '14 at 09:51

1 Answers1

0

You must have to write it in proper format.The correct way is given below

#This is for listing active product page
RewriteRule ^(add-category)/([a-zA-Z-_0-9]+)-([0-9]+)/$ index.php?cid=$3
RewriteRule ^(add-category)/([a-zA-Z-_0-9]+)-([0-9]+)$ index.php?cid=$3
Ricky
  • 284
  • 1
  • 3
  • 19