You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Posts <po...@2-tiersoftware.com> on 2003/03/25 06:06:53 UTC

[users@httpd] Rewrite missing file requests to script

Hi, I'm using Apache 1.3.27.
 
I need to send requests for dir/files that don't exist in/off the root
to a set script file in the root. 
 
So incoming request ( /bobo.pdf ) should be checked if it exists (?:
RewriteCond %{REQUEST_FILENAME} !-f), and if it doesn't then rewrite the
filename to ( /getit.php?filename=/bobo.pdf ).
 
Similarly, ( /subdir/bobo.pdf ) should go to (
/getit.php?filename=/subdir/bobo.pdf ).
 
Any tips or URL's to archive posts is appreciated.
 
Thanks,
Kawika