redirect to a perl script with htaccess

Discussion in 'HTML' started by Nospam, May 27, 2006.

  1. Nospam

    Nospam Guest

    If I wanted to perform a redirect with htaccess to a perl script, how would
    I perform this, would an example like this suffice:

    RewriteEngine On
    RewriteCond %{HTTP_REFERER} !^http://.*example.com*$ [NC]
    RewriteRule .*\.(jpg|JPG)$ /path/to/perlscript.pl
    [T=application/x-httpd-cgi,R]
     
    Nospam, May 27, 2006
    #1
    1. Advertising

  2. Nospam wrote:
    > If I wanted to perform a redirect with htaccess to a perl script, how would
    > I perform this, would an example like this suffice:
    >
    > RewriteEngine On
    > RewriteCond %{HTTP_REFERER} !^http://.*example.com*$ [NC]
    > RewriteRule .*\.(jpg|JPG)$ /path/to/perlscript.pl
    > [T=application/x-httpd-cgi,R]
    >
    >


    You may not want to do this any more with the advent of firewalls like
    Norton's that block the HTTP_REFERER! Noticed in my 404 script. I would
    use HTTP_REFERER to determine if there was a bad link on my site, or an
    obsolete link on someone else site, or if it was direct from a typed
    address or bookmark. My logs are showing about 10% blocked and rising

    --
    Take care,

    Jonathan
    -------------------
    LITTLE WORKS STUDIO
    http://www.LittleWorksStudio.com
     
    Jonathan N. Little, May 27, 2006
    #2
    1. Advertising

  3. "Nospam" <> writes:

    > If I wanted to perform a redirect with htaccess to a perl script, how would
    > I perform this


    The same way you'd configure your server to redirect to any other kind of
    resource.

    What was your Perl question? Or your HTML question, for that matter?

    Followups have been set to the one relevant newsgroup in the list.

    sherm--

    --
    Cocoa programming in Perl: http://camelbones.sourceforge.net
    Hire me! My resume: http://www.dot-app.org
     
    Sherm Pendley, May 27, 2006
    #3
  4. Sherm Pendley wrote:
    > "Nospam" <> writes:
    >
    >
    >>If I wanted to perform a redirect with htaccess to a perl script, how would
    >>I perform this

    >
    >
    > The same way you'd configure your server to redirect to any other kind of
    > resource.
    >
    > What was your Perl question? Or your HTML question, for that matter?
    >
    > Followups have been set to the one alt.html relevant newsgroup in the list.
    >
    > sherm--
    >


    Not really valid for alt.webmaster, either. You you be better to direct them to
    an appropriate newsgroup - like alt.apache.configuration.

    --
    ==================
    Remove the "x" from my email address
    Jerry Stuckle
    JDS Computer Training Corp.

    ==================
     
    Jerry Stuckle, May 27, 2006
    #4
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. David Dorward
    Replies:
    2
    Views:
    1,724
    Art Sackett
    Jun 29, 2003
  2. John Bokma
    Replies:
    0
    Views:
    893
    John Bokma
    Jun 28, 2003
  3. brucie
    Replies:
    0
    Views:
    756
    brucie
    Jun 28, 2003
  4. Craig Bennett
    Replies:
    2
    Views:
    1,063
    Craig Bennett
    Jun 29, 2003
  5. Mark

    .htaccess from perl script?

    Mark, Jan 9, 2004, in forum: Perl Misc
    Replies:
    5
    Views:
    190
    Eric Schwartz
    Jan 12, 2004
Loading...

Share This Page