On 4/27/07, Erez Segal <[EMAIL PROTECTED]> wrote:

In my server, I want to reject access to files that exist. (to some php
files that are allways included via other files, and never needs to be
accessed directly).
I use:
RewriteRule ^(.*)$ - [F]
The trouble is it sends 403 - forbidden.
I want it to send 404 - file not found.
how can this be done?

You can try replacing [F] with [R=404]. I believe that works in some
recent versions of apache, but I'm not sure. Otherwise, you can get
rid of the [F] and simply point the RewriteRule at a non-existing
file. And finally, you can use
ErrorDocument 403 /path/to/errorscript.cgi
where errorscript.cgi sends Status: 404.

Joshua.

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: [EMAIL PROTECTED]
  "   from the digest: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to