Hi to everyone . I starting to build in PHP a new web site with articles, news and others. I have a problem with URL of category . For example I have a scheme like: site.com/?a=downloads&cat=27 How can I make a pretty structure like: site.com/downloads/category/sub-category/sub-sub-category/ for this . cat=27 = 27 is the ID of the latest subcategory in a tree . I have in database something like: ID name parent Please, help me, give a suggest, how can I do that, can you write for me a rule in htaccess ? I need to understand a concept about how to do that. I hope you will help me, Thanks.
Hi! Use .htaccess For URL's .htaccess Code: RewriteEngine on RewriteRule ^/?a=downloads&cat=27 /downloads/category/sub-category/sub-sub-category/ [L] More About .htaccess: http://www.htaccesstools.com/
Thanks for answer but, the subcategories are dinamicaly . I can have a structure like: site.com/downloads/category or site.com/downloads/category/sub-category/ ...or just simple site.com/downloads