Posts: 9
Name: Nerosuran Sieronodeski
Location: U.K.
|
I'm creating a "directory" of sorts
It is organized in the following fashion:
Category SubcategoryItem
There are a variable number of categories, subcategories, and items. Each one has its own page. What I'd like to do is have it so that a person can type a URL which looks like...
http://mydomain.com/category
http://mydomain.com/category/subcategory
http://mydomain.com/category/subcategory/item
http://mydomain.com/category/item
http://mydomain.com/subcategory
http://mydomain.com/subcategory/item
http://mydomain.com/item
...and not use actual separate directories. Ideally, this would all be one PHP file in the root directory which would receive the URL as a string and act accordingly. The URL the user typed would still remain in the address bar.
I've written an .htaccess file before, so I wouldn't be completely lost if you suggested something involving it. (in fact, I've half expecting that the solution will involve a lot of .htaccess)
Although I have looked around for this kind of thing, it's likely the reason I haven't found anything is because I'm looking for the wrong keywords, so pardon me if this is extensively covered somewhere in plain view.
|