[cgiapp] CGI::Application::Dispatch

Lyle webmaster at cosmicperl.com
Tue Feb 10 13:45:21 EST 2009


Hi All,
  I was just looking at this modules docs and I noticed it says:-

It will translate a URI like this (under mod_perl):

    /app/module_name/run_mode

or this (vanilla cgi)

    /app/index.cgi/module_name/run_mode

I'm guess it might have come up before, but might be worth mentioning 
anyway. If you are on Vanilla CGI, you can rename you index.cgi to just 
index, then use Apache config like:-
<Files "index">
  SetHandler cgi-script
</Files>

To get URLs like:-
yourdomain.com/index/run_mode

Personally I'd add .html onto the end of all my URLs, and just parse it 
off later ($ENV{'PATH_INFO'} =~ s/\.html$//;), to get:-
yourdomain.com/index/run_mode.html

Which is way, way more SEO friendly.

If someone knows the Apache config to get this down to:-
yourdomain.com/run_mode.html

Then please share :) I'm guessing it's possible...

Also, I'm sure similar things are possible on IIS, but haven't figured 
that out yet either :/


Lyle



More information about the cgiapp mailing list