This seems like the sort of thing that would be covered in a dozen FAQs, but I can't seem to find it anywhere, and Googling has yielded nothing relevant.

I have an app running under mod_perl, with my own handler. The relevant block in my httpd.conf is:

<Location /foo> SetHandler perl-script PerlHandler FooModule </Location>

When I go to this app at http://localhost/foo/, it works fine, likewise for anything under this, such as http://localhost/foo/action/?id=23, the path-parsing etc. being handled in my app. My only problem is that http://localhost/foo, without the trailing slash, goes nowhere; it doesn't even get to my app.

The only thing I want to do is have the slash-less URI go to the slash-ful URI; I want http://localhost/foo to reach http://localhost/foo/. I don't care about anything underneath, I'm picking that up fine. But I don't know how to do this. All the Alias-type directives seem intended to map URIs to filesystem locations, and I don't have a filesystem location, I have something dynamically generated by my handler.

What's the obvious thing I need to do here?

Thank you.


In reply to Trailing slash problem with mod_perl by jest

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.