List Info

Thread: Help with 404 rewrite rule please.




Help with 404 rewrite rule please.
country flaguser name
Germany
2007-03-12 16:45:30
 Hello
 I am trying to work out how to do a rewrite test so
that I can send a different error response based on
the file extension requested. 

 If the file requested was a .jpg, and it is not
found, send a jpg "not found" file.
 If the file requested was a .html, and it was not
found, send an html/text based 404 response.
 Etc..

 In apache I could use -f as a test for the existence
of a file, to fail and go to an alternate resonse.
However I an uncertain how to create such a rule with
light httpd.

 Would rewrite even be able to catch it before the
built in 404 error system?

 Any assistance greatly apprecciated!

  Thanks

  Nicole


Re: Help with 404 rewrite rule please.
country flaguser name
Germany
2007-03-12 17:02:57
On 2007-03-12 14:45:30 -0700, Nicole Harrington wrote:
>  I am trying to work out how to do a rewrite test so
> that I can send a different error response based on
> the file extension requested. 
> 
>  If the file requested was a .jpg, and it is not
> found, send a jpg "not found" file.
>  If the file requested was a .html, and it was not
> found, send an html/text based 404 response.
>  Etc..
> 
>  In apache I could use -f as a test for the existence
> of a file, to fail and go to an alternate resonse.
> However I an uncertain how to create such a rule with
> light httpd.
> 
>  Would rewrite even be able to catch it before the
> built in 404 error system?
> 
>  Any assistance greatly apprecciated!

you want mod_magnet

http://pixel.
global-banlist.de/lighttpd

for examples

    darix

-- 
           openSUSE - SUSE Linux is my linux
               openSUSE is good for you
                   www.opensuse.org


[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )