Hi Daniweb,
I've got a question regarding what I call "dynamic URL rewriting" -- which is probably the wrong term -- and need some help.
OK, so basically, I know how to rewrite the URL for static pages (i.e. have "localhost/index.php" also work as "localhost/index". However, let's say I have three database categories that each serve different users: "Sports", "Education", and "Finance". Their URL's are as such:
http://localhost/category/index.html
What I'd like is for all of these "folders" to dynamically be updated with one line of RewriteRule code. (something like this down below) That way, if I add 100 categories, I won't have 100 lines of "RewriteRule ..." to add.
I've seen that "environment variables" might do that trick but I'd REALLY prefer not to go that route. Rather, I'm hoping there are existing mod_rewrite functions up to that task.
An example would be Wordpress. If you create a category for each subject you want to write about and turn on permalinks ("pretty links"), you'll notice how they rewrite the URLs. I'm guessing they don't actually write RewriteRule(s) dozens of times...