[cgiapp] URL rewriting...

David Moreno david at axiombox.com
Fri Mar 14 17:37:01 EDT 2008


On Wed, Mar 5, 2008 at 5:54 PM, Robert Hicks <sigzero at gmail.com> wrote:
> I haven't a clue on this one. I do the standard CA thing with page names:
>
>  ?rm=home
>  ?rm=contact
>
>  How do I do a URL re-write that makes the first one /home/ and the
>  second one /contact/ ?
>
>  Pointers would help...you don't have to give me the whole answer. I like
>  to learn.  :-)

I usually use modrewrite on an .htaccess with something like:

RewriteRule ^(.*)/$ /my.cgi?rm=$1

Yes, you can refine a lot the regex, but that's simply out of scope of
this reply ;)

-- 
David Moreno - http://www.damog.net/
 Yes, you can.


More information about the cgiapp mailing list