Re: Request_URI and ErrorDocument interaction ?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

On Wed, Sep 6, 2017 at 1:54 PM, Cordente Emmanuel
<ECordente@xxxxxxxxxxxxxxxx> wrote:
>
> Why the Request_URI environment variable is change by the ErrorDocument
> treatment ?

The ErrorDocument handling is an internal redirect which changes the
URI internally (hence REQUEST_URI) and runs the SetEnvIf again...

The original URI is placed in REDIRECT_URL, though.

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

I'd try something like (untested):

RewriteCond %{ENV:REDIRECT_URL} ^(.+)$
RewriteRule ^ - [E=originalPath:%1]

RewriteCond %{ENV:originalPath} ^$
RewriteRule ^ - [E=originalPath:%{REQUEST_URI}]

but there's probably a better way to do it.


Regards,
Yann.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx




[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux