I need to make Apache run a short script when it goes into certain directories. The obvious thought is that somehow, something in the .htaccess file can be used to make it run the script.

Background: I work at a large company. They have a standardized security system (WSL Auth). If a site contains a .wslauth file, (only on NS Ent. Server), the .wslauth file will say what "group" of people can access the area. If the person doesn't have a cookie set, it sends them to the password server where they "log in", then back to their site where the WSL will then check that cookie's "group" against the allowed group.

My problem is that I am not running NS Ent. Server, I run Apache on Linux. However, everyone wants the other method because it means they only have to memorize one password. My current method means they have to remember a WSL one for the rest of the intranet, and one just for my system.

So, is it possible to make Apache run a perl script from the .htaccess file?

In reply to How to cause Apache's .htaccess file to run a Perl script by tame1

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.