diff --git a/src/lib/components/Navigation.svelte b/src/lib/components/Navigation.svelte index cdf6dc26..5192b039 100644 --- a/src/lib/components/Navigation.svelte +++ b/src/lib/components/Navigation.svelte @@ -28,7 +28,7 @@ {/if} diff --git a/src/routes/config/+page.js b/src/routes/config/+page.js index 60964402..91037b00 100644 --- a/src/routes/config/+page.js +++ b/src/routes/config/+page.js @@ -2,5 +2,5 @@ import {redirect} from "@sveltejs/kit" /** @type {import("./$types").PageLoad} */ export function load() { - throw redirect(302, "/config/chords") + throw redirect(302, "/config/chords/") } diff --git a/static/.htaccess b/static/.htaccess index a5e389bf..f560ab26 100644 --- a/static/.htaccess +++ b/static/.htaccess @@ -1,20 +1,12 @@ RewriteEngine On # force https -RewriteCond %{HTTPS} !=on -RewriteRule ^/?(.*) https://%{SERVER_NAME}/$1 [R,L] +RewriteCond %{HTTPS} off +RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L] -# remove trailing slash -RewriteCond %{REQUEST_FILENAME} !-d -RewriteRule ^(.*)/$ /$1 [L,R] # R=301 - -# SPA mode +# https://kit.svelte.dev/docs/single-page-apps#apache RewriteBase / RewriteRule ^200\.html$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /200.html [L] - -# redirect not found urls to .html files -RewriteCond %{REQUEST_FILENAME} !-f -RewriteRule ^([^./]+)/?$ $1.html [QSA] diff --git a/vite.config.js b/vite.config.js index 08118bd7..01ca625e 100644 --- a/vite.config.js +++ b/vite.config.js @@ -2,7 +2,7 @@ import {sveltekit} from "@sveltejs/kit/vite" import {defineConfig} from "vite" import {SvelteKitPWA} from "@vite-pwa/sveltekit" // noinspection ES6PreferShortImport -// import {themeColor} from "./src/lib/style/theme.server.js" +import {themeColor} from "./src/lib/style/theme.server.js" export default defineConfig({ plugins: [ @@ -10,13 +10,13 @@ export default defineConfig({ SvelteKitPWA({ kit: { adapterFallback: "/200.html", - trailingSlash: "never", + trailingSlash: "always", }, includeAssets: ["favicon.png"], manifest: { name: "dot i/o", id: "dot_io_v2", - // theme_color: themeColor, + theme_color: themeColor, icons: [ { src: "icon.svg",