Skip to content

Commit 9add4ca

Browse files
committed
Fixed "#" in redirection targets getting percent-encoded.
1 parent 2cf5247 commit 9add4ca

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/app.lua2p

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1761,7 +1761,7 @@ local function buildWebsite()
17611761
targetUrl = fixRelativeUrl(targetUrl)
17621762

17631763
b('\tRewriteCond %%{REQUEST_URI} "=%s"\n', url)
1764-
b('\tRewriteRule .* "%s" [R=301,L]\n', escapeRuleSub(targetUrl))
1764+
b('\tRewriteRule .* "%s" [NE,R=301,L]\n', escapeRuleSub(targetUrl))
17651765
end
17661766

17671767
for url, targetUrl in pairsSorted(site._unwrittenRedirects) do
@@ -1784,7 +1784,7 @@ local function buildWebsite()
17841784
end
17851785

17861786
b(
1787-
'\tRewriteRule .* "%s%s" [R=301,L]\n',
1787+
'\tRewriteRule .* "%s%s" [NE,R=301,L]\n',
17881788
escapeRuleSub(targetUrl),
17891789
(not query or targetUrl:find("?", 1, true)) and "" or "?"
17901790
)

0 commit comments

Comments
 (0)