fix: Modify stable url for keyboard download to kmp file#475
fix: Modify stable url for keyboard download to kmp file#475darcywong00 merged 3 commits intomasterfrom
Conversation
mcdurdin
left a comment
There was a problem hiding this comment.
Hmm, is this a much older bug, not actually coming out of the Apache/docker transition? Let's make sure we get it right for all patterns. The bundled installer .exe is now actually not a "bundle" but a file name pattern which causes the bundle to download (see https://kmn.sh/kb35, keyman-setup filename patterns section), so we may need to do some more work to get that right.
| RewriteRule "^keyboard/([^/]+)/download/kmp$" "package/download.php?type=keyboard&id=$1" [END,QSA] | ||
|
|
||
| #download-exe | ||
| RedirectMatch "/go/keyboard/([^/?]+)/download/exe$" "/keyboards/download?id=$1&platform=windows&mode=bundle" |
There was a problem hiding this comment.
What about this rule and download-js? They also seem to be wrong?
There was a problem hiding this comment.
For .exe, look at the pattern generated e.g. by https://keyman.com/keyboards/install/khmer_angkor, and use that: https://downloads.keyman.com/windows/stable/17.0.331/keyman-setup.khmer_angkor.exe
There was a problem hiding this comment.
download-js should go to downloads.keyman.com/keyboards/name/version/name.js, e.g. https://downloads.keyman.com/keyboards/thamizha_bamini/2.2/thamizha_bamini.js
There was a problem hiding this comment.
Splitting download-exe and download-js to be handled in #495
Fixes #474
From the reported issue,
We want to change /go/keyboard/**/download/kmp to match the behavior of /go/package instead of going to a keyboard landing page.
This modifies the rule in .htaccess to match what /go/package does.
keyman.com/go/.htaccess
Lines 27 to 28 in b695ba0
The links can be manually compared on
keyman.com/_test/go.md
Lines 348 to 354 in b695ba0
Until this PR is merged, localhost will redirect to the kmp file while the live site still goes to the keyboard page.