Apache configuration for silent rewrite of query strings like codeigniter
- by jwir3
Codeigniter rewrites query strings like the following:
http://somedomain.com/index.php?q=something
to become:
http://somedomain.com/index.php/q/something
I'd like to imitate this behavior on a (very) lightweight website I am developing for a wedding RSVP system. I don't want the bloat of codeigniter, nor do I need anything else that it provides. The only thing I'd like is this.
Unfortunately, I don't know how to setup a mod-rewrite rule that accomplishes this. I can setup a rule that translates /q/something into ?q=something, but I can't get one that does that without changing the URL the user is viewing.
I'm basically looking for something that is, in effect, a "silent" version of the rewrite. That is, I want something that rewrites q/something to ?q=something, but leaves the user's URL in their address bar as q/something.
Thanks in advance!