hi i want to know how to rewrite url for differ pages
for example:
http://example.com/category.php?cat=$category
in .htacces url i want like this example.com/category/
example.com/subCategory.php?cat=$category&subCat=$subCategory in .htacces url i want like this example.com/category/subcategory/
example.com/product.php?product=$product in .htacces url i want like this example.com/product/
thanx in advance
Using the rewrite engine and rewrite rules you can achieve this pretty easily.
RewriteEngine on
RewriteRule ^/category/([a-zA-Z0-9-]*)/?$ /category.php?cat=$1
Now just apply the same logic to your other scenarios.