Home > Archive > PERL Miscellaneous > May 2006 > redirect to a perl script with htaccess
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
redirect to a perl script with htaccess
|
|
| Nospam 2006-05-27, 7:00 pm |
| 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]
| |
| Jonathan N. Little 2006-05-27, 7:00 pm |
| 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
| |
| Sherm Pendley 2006-05-27, 7:00 pm |
| "Nospam" <nospam@home.com> 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
| |
| Jerry Stuckle 2006-05-27, 7:00 pm |
| Sherm Pendley wrote:
> "Nospam" <nospam@home.com> writes:
>
>
>
>
> 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.
jstucklex@attglobal.net
==================
|
|
|
|
|