RewriteEngine On
#Below code replace string value
RewriteRule ^category/([^/\.]+) category.php?tools_category=$1
#Below code replace number value i.e. fetch by id
RewriteRule ^category/([0-9]+) category.php?cat_id=$1
Where
category.php - is your page name
Original URL- 1 - http://localhost/kanha/category.php?tools_category=domain
After 1 - http://localhost/kanha/category/domain
Original URL- 2 - http://localhost/kanha/category.php?cat_id=1
After 1 - http://localhost/kanha/category/1
0 Comments