httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Robert Andersson" <>
Subject Re: [users@httpd] Redirection
Date Fri, 10 Oct 2003 10:42:33 GMT
Joris Vankerschaver wrote:
> I'm experiencing strange behaviour with my CGI setup under Apache 2.0.47.
> The problem is the following:  I want to set up some sort of Funky
> Caching, where a 404 error is generated as soon as a page is not found.
> Through a custom .htaccess file, a CGI script is then called to regenerate
> this page and redirect the browser to this new page.
> It is precisely in this last step that I have a problem.  To redirect, my
> script outputs the following:
> ---
> Location:
> Content-Type: text/html

I'm not sure that is the problem you are having, but I recently made a
similar system. This was in order generate "versions" of image files on
demand. In a directory I would have an original image file, eg.
"image.jpeg". I then could address it like "image-70,600,0", which caused a
404 error document to be invoked that created an "image-70,600,0.jpeg" that
was 600 pixels wide and 70% quality, and (with some doubt) I had to send a
Location header to the exact same URI that the original request was for.

This worked fine when I directly addressed a not yet created file, but when
the images were inlined in a HTML document, Internet Explorer would show
them as broken. Maybe some infinite loop prevention? Mozilla, and other
decent browsers, managed to work properly.

My first workaround was to append a question mark (?) after the URI, which
worked fine. In the final version, the error document will also deliver the
image with correct Last-Modified and other headers, which works as a charm.

Robert Andersson

The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:> for more info.
To unsubscribe, e-mail:
   "   from the digest:
For additional commands, e-mail:

View raw message