i have some sub link files in same directory like index.php and subcategory.php and ad_list.php and single_ad.php.
1:- when i open index file and i want choose any category from navigation bar. for example when i clicked vehicle category a href="subcategory.php?cat=“vehicles” "Category Name /a and redirect new page subcategory.php
this is htaccess rewrite link.
RewriteRule ^subcategory/([a-zA-Z0-9_-]+) subcategory.php?cat=$1
now i am right on subcategoy page still it is working ok display url like this.
http://localhost/folder/subcategory/vehicles
2:- now here in subcategory page sub navigation bar like
cars , heavy vehicles, autoparts, etc
and now than i click cars a href="ad_list.php?subcat=“vehicles” "Cars /a and i want redirect ad_list.page but it is not working ok and displayed url this type
http://localhost/folder/subcategory/ad-list/cars
but i want link this type http://localhost/foldert/ad-list/cars
it is htaccess line for this linke RewriteRule ^ad-list/([a-zA-Z0-9_-]+) ad_list.php?subcat=$1