httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Zac Stevens <...@cryptocracy.com>
Subject Re: [users@httpd] Equivalent of IIS custom 404
Date Tue, 24 Jun 2003 15:13:09 GMT
Hi Aidan,

On Tue, Jun 24, 2003 at 03:43:32PM +0100, Aidan Whitehall wrote:
> It appears as though Apache was reports the information correctly --
> i.e. that there was no query string in the original request, nor in the
> redirection.
> 
> However, I'd have thought some other cgi variable would contain the
> value "casestudies", perhaps cgi.http_referer. Unfortunately, it doesn't
> seem to -- if you dump the entire cgi associative array to the page, the
> string "casestudies" doesn't appear anywhere.

And indeed it should!  When using the ErrorDocument system, a number of
special varibles are set to provide details of the failed request.  You're
probably looking for REDIRECT_URL, but see here for details:

http://httpd.apache.org/docs-2.0/custom-error.html

However, while this is a perfectly reasonable way of solving the problem it
probably isn't the best - it's certainly not the most efficient, which may
be a concern if you're expecting this feature to get a workout.

If you are worried about performance and would like to investigate some
other options, two spring to mind immediately.  First of all, mod_rewrite
allows you to define a "RewriteMap" which can make use of an external
program.  Unfortunately, this requires a program which can be run from the
commandline - so your CF redirect system might not work.

The other way would more closely emulate the behaviour you are used to on
IIS, but will require a bit more configuration.  This makes use of the
"path_info" feature, so take a look at this to get an idea about how useful
it might be for you:

http://httpd.apache.org/docs-2.0/mod/core.html#acceptpathinfo

Cheers,


Zac

---------------------------------------------------------------------
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


Mime
View raw message