Re: Mod rewrite F flag

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 4/27/07, Erez Segal <segalerez@xxxxxxxxx> 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: users-unsubscribe@xxxxxxxxxxxxxxxx
  "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx


[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux