httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Cordente Emmanuel <ECorde...@VOYAGES-SNCF.COM>
Subject [users@httpd] Request_URI and ErrorDocument interaction ?
Date Wed, 06 Sep 2017 11:54:07 GMT
Hi,

I'm having a problem using together Request_URI and ErrorDocument, and I can't solved it by
myself.
My initial need was to very simple: separate the request path in the logformat.

I've started to use the %U format string, it was fine, but I notice that in case of some rewriterule
my logfile was containg the result of the rewrite and not the original request path.
So I've figured to make it work doing this:

SetEnvIf Request_URI ^(.*)$ originalPath=$1
LogFormat "... , {originalPath}e , ..."

This work in most of the case, but I still have a problem with error pages.
In my configuration I use an ErrorDocument directive:

ErrorDocument 404 /pagenotfound

When I call an unknown url (404) like: /nothing , the generated log is /pagenotfound (it should
be /nothing)
This is very problematic, because I cannot analyse the origin of 404 errors.

Why the Request_URI environment variable is change by the ErrorDocument treatment ?

Is there a way to get the real request path, either with rewriterule and ErrorDocument ?

Thank you.

Emmanuel


Mime
View raw message