Reply
.htaccess, wildcards, and directories
Old 06-22-2007, 01:19 PM .htaccess, wildcards, and directories
Invisionary's Avatar
Novice Talker

Posts: 9
Name: Nerosuran Sieronodeski
Location: U.K.
I'm creating a "directory" of sorts

It is organized in the following fashion:

Category
Subcategory
Item
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.
Invisionary is offline
Reply With Quote
View Public Profile Visit Invisionary's homepage!
 
When You Register, These Ads Go Away!
Old 06-27-2007, 12:14 AM Re: .htaccess, wildcards, and directories
seolman's Avatar
Soaked but happy...

Posts: 677
Name: DaveBob Roundpants III
Location: Heredia, Costa Rica
Give this a look

http://www.askapache.com/htaccess/apache-htaccess.html
seolman is offline
Reply With Quote
View Public Profile Visit seolman's homepage!
 
Old 06-27-2007, 12:26 AM Re: .htaccess, wildcards, and directories
ForrestCroce's Avatar
Half Man, Half Amazing

Posts: 3,024
Name: Forrest Croce
Location: Seattle, WA
Great resource! They didn't have a chapter on what I was looking for, but a couple of other ones turned out to be what I need, and I learned how to make comments in a growing .htaccess file, which is what I was really looking for in the first place.
ForrestCroce is offline
Reply With Quote
View Public Profile Visit ForrestCroce's homepage!
 
Old 07-09-2007, 03:19 AM Re: .htaccess, wildcards, and directories
Novice Talker

Posts: 9
Name: salu
search mod re write webamster tools over gogole.
__________________
Free PHP Mysql Hosting
s4salman is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to .htaccess, wildcards, and directories
 

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off




   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML

 


Page generated in 0.13733 seconds with 12 queries