Bug #2526

Support url.rewrite (handle_uri_raw callbacks) in $HTTP["url"] and $HTTP["query-string"]

Added by stbuehler 11 months ago. Updated 6 months ago.

Status:FixedStart date:2013-11-01
Priority:NormalDue date:
Assignee:-% Done:

100%

Category:core
Target version:1.4.34
Missing in 1.5.x:No

Description

$HTTP["query-string"] (which is not documented to not work) should be trivial to fix; supporting $HTTP["url"] adds some small overhead if a rewrite triggers (we will "decode" the url twice, not using the first result).

Associated revisions

Revision 2927
Added by stbuehler 8 months ago

[core] decode URL before rewrite, enabling it to work in $HTTP["url"] conditionals (fixes #2526)

From: Stefan B├╝hler <>

History

#1 Updated by stbuehler 8 months ago

  • Status changed from New to Fixed
  • % Done changed from 0 to 100

Applied in changeset r2927.

#2 Updated by kenzo 6 months ago

I believe this may have broken the following for me:

$HTTP["url"] != "^(/example1|/example2)" {
       include "/etc/lighttpd/rewrite_for_real_url.conf" 
}

with rewrite_for_real_url.conf being:

url.rewrite-once = (
        "^/(typo3|typo3temp/|typo3conf/|uploads/|fileadmin/|t3lib/|robots\.txt|clear\.gif).*$" => "$0",
        "^/$" => "index.php",
        "^/index.php\?.*$" => "$0",
        "^typo3$" => "typo3/index_re.php",
        ".\?([^.]+)" => "index.php?$1",
        "^/favicon.ico$" => "$0",
        ".*" => "index.php",
        "^/([A-Za-z_0-9-]+).html(.*)" => "/index.php?$1&$2" 
)

This has been working fine in all versions <= 1.4.33 and stopped working in >= 1.4.34.

#3 Updated by stbuehler 6 months ago

I think it is the other way round. the rewrites where never doing anything because your config was broken, and now they are working.

Also available in: Atom