Re: [cgiapp] URL rewriting...

2008-03-15 Thread David Moreno
On Wed, Mar 5, 2008 at 5:54 PM, Robert Hicks [EMAIL PROTECTED] 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.

#  CGI::Application community mailing list  
####
##  To unsubscribe, or change your message delivery options,  ##
##  visit:  http://www.erlbaum.net/mailman/listinfo/cgiapp##
####
##  Web archive:   http://www.erlbaum.net/pipermail/cgiapp/   ##
##  Wiki:  http://cgiapp.erlbaum.net/ ##
####




[cgiapp] URL rewriting...

2008-03-05 Thread Robert Hicks

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.  :-)


Robert


#  CGI::Application community mailing list  
####
##  To unsubscribe, or change your message delivery options,  ##
##  visit:  http://www.erlbaum.net/mailman/listinfo/cgiapp##
####
##  Web archive:   http://www.erlbaum.net/pipermail/cgiapp/   ##
##  Wiki:  http://cgiapp.erlbaum.net/ ##
####




Re: [cgiapp] URL rewriting...

2008-03-05 Thread Michael Peters
Robert Hicks 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/ ?

CGI::Application::Dispatch. Not only will it let do URLs like that, but it will
also help you combine multiple app modules into a single app.

If your application module is named MyApp::Stuff then you can do urls like

  /stuff/home
  /stuff/contact

Very easily.

-- 
Michael Peters
Plus Three, LP


#  CGI::Application community mailing list  
####
##  To unsubscribe, or change your message delivery options,  ##
##  visit:  http://www.erlbaum.net/mailman/listinfo/cgiapp##
####
##  Web archive:   http://www.erlbaum.net/pipermail/cgiapp/   ##
##  Wiki:  http://cgiapp.erlbaum.net/ ##
####