Rewriting URL using HTACCESS for category name

I want to rewrite the URL using htaccess... for converting below URL


I don't want to write category in url, I am using below code but no use

RewriteRule ^(.*)/ category.php?id=$1
RewriteRule ^(.*) category.php?id=$1    


You need to use a RewriteCond to manipulate query strings.

RewriteEngine on

RewriteCond %{THE_REQUEST} /category\.php\?id=([^\s&]+) [NC]
RewriteRule ^ /%1? [NE,L,R]

Need Your Help

CActiveForm ajax validation error not displaying in the form

ajax yii

I have created a form using CActiveForm in yii. I am using ajax to submit the form using CHtml::ajaxSubmitButton. Form submission using ajax is working correctly and I am able to get the values in ...

Python Convert set to list, keep getting TypeError: 'list' object is not callable

python list set

I am trying to write a program that adds items to a list based on a random number. Part of the program is potentially rolling additional items, but all duplicate items should be rerolled. My issue is