I have experimented a lot already however they did not work for me, so i have to put this query for which i need very specific solutions.
No CMS is used. The website is an eCommerce site developed using php
My site url structure is
- For Product Pages =
https://www[dot]sitename.com/product.php?product=productid
- For Category Pages =
https://www[dot]sitename.com/category.php?category=category-name
- For SubCat Pages =
https://www[dot]sitename.com/category.php?subcategory=sub-category-name
I want
- For Product Pages =
https://www[dot]sitename.com/product/productid/
- For Category Pages=
https://www[dot]sitename.com/category/category-name
- For SubCat Pages =
https://www[dot]sitename.com/category/subcategory/sub-category-name
How can i do this using .htaccess?
Thank you all for your suggestions. However none of the methods worked for me. Let me add few more things about the site and hosting which may help you analyze my problem and provide alternative solutions.
Add this to your
.htaccess
in your web root/
directoryThe following htaccess rules work for me, and hopefully these will work for you.