Currently i have this store files structure:
www.mysite.com/store as the index for the store (store.php)
(already working without .php) where i have all the items listed
Then i have the subcategories file as subcategories.php
Finally my products file product_detail.php
This is what i have done so far:
RewriteCond %{THE_REQUEST} /subcategories\.php\?subcatid=([a-zA-Z0-9_-]+) [NC]
RewriteRule ^/store/%1? [R=302,L,NE]
RewriteRule ^store/([a-zA-Z0-9_-]+)/?$ subcategories.php?subcatid=$1 [L,QSA,NC]
And made a php script to change the id for the name in the url following this code:
if(isset($_GET['subcatid'])){
if(is_numeric($_GET['subcatid'])){ //Check if the input is all numeric
//Grab the username from database
//Redirect user to site.com/user/$username
}
}
So, i final example is like
www.mysite.com/store/furniture <- subcatid
Where is listing all the the products from that subcategory.
It's loading ok but styles and js are missing, how can i correct this and what approach should i take to each subcategory product with htaccess?