You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by John Smith <jo...@yahoo.com> on 2003/10/18 01:51:24 UTC

[users@httpd] errordocument for images?

Is it possible to use different "not found" files
according to the file requested? I'd like to use a
"not found" image for images, and a "not found" html
file for everything else.

I suspect it might be possible with mod_rewrite, but I
don't see a variable that might contain a response
code (404) that could be used with RewriteCond.

TIA,
John


__________________________________
Do you Yahoo!?
The New Yahoo! Shopping - with improved product search
http://shopping.yahoo.com

---------------------------------------------------------------------
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@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] errordocument for images?

Posted by Robert Andersson <ro...@profundis.nu>.
John Smith wrote:
> Is it possible to use different "not found" files
> according to the file requested? I'd like to use a
> "not found" image for images, and a "not found" html
> file for everything else.
>
> I suspect it might be possible with mod_rewrite, but I
> don't see a variable that might contain a response
> code (404) that could be used with RewriteCond.

You possibly could, but I wouldn't recommend it; it would could get really
messy.

A better suggestion is to use a PHP- or CGI-script that kicks in on all
404s. It could then examine the original REQUEST_URI variable, to output the
proper document.

Regards,
Robert Andersson


---------------------------------------------------------------------
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@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org