I'd like to create a custom web page for displaying photos. Normally, when the web browse pointed to a .jpg or .gif file, it is displayed with the default plain background. I'd like to change this to a custom page to match the rest of my website.
Is it possible to use the .htaccess file to redirect users to either a custom webpage or even a cgi script when the browser points to a .jpg of .gif? I am thinking it might work similiar to an error page.