Mailing List Archive

[Bug 66099] Error in the documentation for %{REQUEST_URI}
https://bz.apache.org/bugzilla/show_bug.cgi?id=66099

Jörg Reinholz <joerg.reinholz@fastix.org> changed:

What |Removed |Added
----------------------------------------------------------------------------
Keywords| |FAQ
URL| |https://httpd.apache.org/do
| |cs/current/mod/mod_rewrite.
| |html#rewritecond

--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org
[Bug 66099] Error in the documentation for %{REQUEST_URI} [ In reply to ]
https://bz.apache.org/bugzilla/show_bug.cgi?id=66099

Eric Covener <covener@gmail.com> changed:

What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |NEEDINFO

--- Comment #1 from Eric Covener <covener@gmail.com> ---
In my testing the query string is not part of the %{REQUEST_URI} variable
resolved by mod_rewrite (or expression-based use)

The REQUEST_URI environment variable passed to CGI and CGI-like handlers has a
different value, the one you'd expect based on the name (including the query)

If you think it really contradicts the doc in mod_rewrite in some config please
share the most basic config that demonstrates the issue and the resulting
rewrite:trace8 and access_log.

--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org
[Bug 66099] Error in the documentation for %{REQUEST_URI} [ In reply to ]
https://bz.apache.org/bugzilla/show_bug.cgi?id=66099

--- Comment #2 from Jörg Reinholz <joerg.reinholz@fastix.org> ---
Created attachment 38307
--> https://bz.apache.org/bugzilla/attachment.cgi?id=38307&action=edit
error.log .filtered

The error.log shows explicit:

applying pattern '(.*)' to uri '/'
rewrite '/' -> 'https://home.fastix.org/'
explicitly forcing redirect with https://home.fastix.org/
escaping https://home.fastix.org/ for redirect
copying foo=bar to query string for redirect
redirect to https://home.fastix.org/?foo=bar [REDIRECT/301]

--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org
[Bug 66099] Error in the documentation for %{REQUEST_URI} [ In reply to ]
https://bz.apache.org/bugzilla/show_bug.cgi?id=66099

--- Comment #3 from Jörg Reinholz <joerg.reinholz@fastix.org> ---
Created attachment 38308
--> https://bz.apache.org/bugzilla/attachment.cgi?id=38308&action=edit
This show the redirect of the client-side.

--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org
[Bug 66099] Error in the documentation for %{REQUEST_URI} [ In reply to ]
https://bz.apache.org/bugzilla/show_bug.cgi?id=66099

--- Comment #4 from Jörg Reinholz <joerg.reinholz@fastix.org> ---
Created attachment 38309
--> https://bz.apache.org/bugzilla/attachment.cgi?id=38309&action=edit
The config file for the apache

--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org
[Bug 66099] Error in the documentation for %{REQUEST_URI} [ In reply to ]
https://bz.apache.org/bugzilla/show_bug.cgi?id=66099

--- Comment #5 from Jörg Reinholz <joerg.reinholz@fastix.org> ---
on fastix.de i have only this in a .htaccess - File. This has the same effect:
The query (try fastix.org/test?foo=bar) is in the redirect-uri:


RewriteEngine On
RewriteRule (.*) https://www.fastix.org%{REQUEST_URI}

--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org
[Bug 66099] Error in the documentation for %{REQUEST_URI} [ In reply to ]
https://bz.apache.org/bugzilla/show_bug.cgi?id=66099

--- Comment #6 from Jörg Reinholz <joerg.reinholz@fastix.org> ---
Sorry, there is an error in my descryption:

on fastix.de i have only this in a .htaccess - File. This has the same effect:
The query (try fastix.de/test?foo=bar) is in the redirect-uri:


RewriteEngine On
RewriteRule (.*) https://www.fastix.org%{REQUEST_URI}

---
chanched „try fastix.org/test?foo=bar“ to „try fastix.de/test?foo=bar“

--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org
[Bug 66099] Error in the documentation for %{REQUEST_URI} [ In reply to ]
https://bz.apache.org/bugzilla/show_bug.cgi?id=66099

--- Comment #7 from Yann Ylavic <ylavic.dev@gmail.com> ---
The query-string is used because the target URI is a full URI (starting with
"https:") and mod_rewrite preserves the query-string for full URIs.

If you want to avoid that, use the [QSD] flag (instead of [QSA]).

--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org
[Bug 66099] Error in the documentation for %{REQUEST_URI} [ In reply to ]
https://bz.apache.org/bugzilla/show_bug.cgi?id=66099

--- Comment #8 from Jörg Reinholz <joerg.reinholz@fastix.org> ---
> „The query-string is used because the target URI is a full URI“

I think this should also be noted in the documentation in this case. Because
the statement "This notably excludes the query string" conveys that the query
is never part of '%{REQUEST_URI}'.

--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org
[Bug 66099] Error in the documentation for %{REQUEST_URI} [ In reply to ]
https://bz.apache.org/bugzilla/show_bug.cgi?id=66099

--- Comment #9 from Yann Ylavic <ylavic.dev@gmail.com> ---
(In reply to Jörg Reinholz from comment #8)
> the statement "This notably excludes the query string" conveys that the
> query is never part of '%{REQUEST_URI}'.

It's actually true that the query-string is never part of %{REQUEST_URI} in
mod_rewrite, the query string generated by your redirect rule comes from the
rule itself, not the content of the %{REQUEST_URI} variable.

Nevertheless, it probably should be included in the docs (though not relative
to %{REQUEST_URI}).

--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org
[Bug 66099] Error in the documentation for %{REQUEST_URI} [ In reply to ]
https://bz.apache.org/bugzilla/show_bug.cgi?id=66099

Yann Ylavic <ylavic.dev@gmail.com> changed:

What |Removed |Added
----------------------------------------------------------------------------
Status|NEEDINFO |RESOLVED
Resolution|--- |FIXED

--- Comment #10 from Yann Ylavic <ylavic.dev@gmail.com> ---
Note added in r1901487.

--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org