diff --git a/.htaccess b/.htaccess index f54bc722..443b53b3 100644 --- a/.htaccess +++ b/.htaccess @@ -104,6 +104,10 @@ RewriteCond "%{HTTP_COOKIE}" embed_keyboards_no_locale_redirect [OR] RewriteCond "%{QUERY_STRING}" embed RewriteRule "^keyboards(/)?$" "/_content/keyboards/index.php" [END,QSA] +# Dedicated landing pages +RewriteCond "%{HTTP_COOKIE}" embed_keyboards_no_locale_redirect [OR] +RewriteCond "%{QUERY_STRING}" embed +RewriteRule "^keyboards/h/(.*)$" "/_content/keyboards/h/$1/index.php" [END,QSA] diff --git a/_content/keyboards/index.php b/_content/keyboards/index.php index e7f17925..3f3675f2 100644 --- a/_content/keyboards/index.php +++ b/_content/keyboards/index.php @@ -40,7 +40,10 @@ function _m($id, ...$args) { return Locale::m(LOCALE_KEYBOARDS, $id, ...$args Menu::render([]); // we'll be doing client-side os detection now Body::render(); - $keyboardsPage = '/' . Locale::pageLocale() . '/keyboards/'; + // For embedded mode, use root-level /keyboards, for Keyman 14.0-18.0. + // See .htaccess for full discussion (line ~32) + $keyboardsPage = ($embed != 'none') ? '/keyboards' : + '/' . Locale::pageLocale() . '/keyboards/'; ?>