.htaccess and perl cgi

Discussion in 'Perl' started by Stoco, Jan 12, 2004.

  1. Stoco

    Stoco Guest

    I am trying to create a generic interface that will manage various
    ..htaccess protected directories. In the ideal world, the .htaccess
    would trigger a cgi script that would take login information and store
    it to a file, or block access all together.

    For example,
    anytime someone logs in, the .htaccess file should direct the user
    name and IP address to be stored in a log file through this cgi. A
    cron could be scheduled to determine if the same user name accesses
    the site frequently throughout the day from several IP addresses, thus
    signifying abuse.

    Now, I know I can put a cgi script in the protected directory and have
    it be the default page for that directory, but I am looking for
    something a bit more elegant. I would actually like the script to be
    in the background and not have it matter what the index.htm file (or
    whatever) is doing.

    Ultimatley, this question may be more geared to Apache (searched there
    also), but I am looking to the Perl community for guidance since
    someone out there has surely decided they needed a robust way to log
    ..htaccess entries.

    In my ideal dream world, the .htaccess file would be able to call a
    cgi script. Is this possible? If so, how?

    Stoco, Jan 12, 2004
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.