View previous topic :: View next topic |
Author |
Message |
meyerm Veteran
![Veteran Veteran](/images/ranks/rank_rect_5_vet.gif)
![](images/avatars/d9e8f8f73d32da1c4ca74.gif)
Joined: 27 Jun 2002 Posts: 1311 Location: Munich / Germany
|
Posted: Sun Nov 20, 2005 4:20 pm Post subject: using a .jpg as ErrorDocument in Apache2 |
|
|
Hi,
is there some way to display a JPG as ErrorDocument? I have directories with lots of images and instead of a 404 HTML page I want to return a dummy.jpg when a client tries to access a non existant image.
Thank you,
M |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
Da Fox Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
![](images/avatars/86668137442cb22f1820ab.gif)
Joined: 06 Jul 2005 Posts: 342
|
Posted: Sun Nov 20, 2005 4:36 pm Post subject: |
|
|
Why not simply imbed the jpg in a HTML document?
Quote: | <html>
<body>
<img src=img.jpg></img>
</body>
</html> |
--edit:
If you want to rotate images randomly there are a bunch of options, either look into PHP (should be able to be set as errorpage) or make a crontab/script that symlinks dummy.jpg to some random image every minute or so. _________________ "Man fears the darkness, and so he scrapes away at the edges of it with fire."
- Rei Ayanami
JGBE, a Java based GameBoy Emulator |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
meyerm Veteran
![Veteran Veteran](/images/ranks/rank_rect_5_vet.gif)
![](images/avatars/d9e8f8f73d32da1c4ca74.gif)
Joined: 27 Jun 2002 Posts: 1311 Location: Munich / Germany
|
Posted: Sun Nov 20, 2005 4:46 pm Post subject: |
|
|
Da Fox wrote: | Why not simply imbed the jpg in a HTML document? |
Thank you for your proposal. But that won't work. The images are already embedded into HTML files. And when an image is missing, the dummy.jpg should be embedded into the HTML file. Think of an online shop with hundreds of DVDs but not all covers are already on the harddisk. Missing covers should then simply be a "will follow soon" jpeg or something like that.
Of course I could solve the problem within PHP or sth. like that, but I can't modify the creating program / template so I would like to solve the problem with apache or the underlying GNU utils / fs. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
|