redirect to a perl script with htaccess

G

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]
 
J

Jonathan N. Little

Nospam said:
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
 
S

Sherm Pendley

Nospam said:
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--
 
J

Jerry Stuckle

Sherm said:
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.
(e-mail address removed)
==================
 

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. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,982
Messages
2,570,186
Members
46,740
Latest member
JudsonFrie

Latest Threads

Top