Skip to content

Commit

Permalink
404 fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Juřička, Tomáš committed Dec 11, 2023
1 parent 1215d97 commit 6aa925e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
8 changes: 6 additions & 2 deletions public/.htaccess
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,14 @@ RewriteEngine on

# presmerovani www na non-www

RewriteCond %{HTTP_HOST} ^www\.(._)$ [NC]
RewriteRule ^(._)$ https://%1/$1 [R=301,L]
RewriteCond %{HTTP*HOST} ^www\.(.*)$ [NC]
RewriteRule ^(.\_)$ https://%1/$1 [R=301,L]

# presmerovani http na https

RewriteCond %{HTTPS} !=on [NC]
RewriteRule ^(.\*)$ https://%{HTTP_HOST}/$1 [R=301,L]

# 404 page

ErrorDocument 404 /404.html
2 changes: 1 addition & 1 deletion src/pages/404.astro
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const metaTags = {
<Layout {...metaTags}>
<section class="md:pt-16 pb-16 lg:pb-32 bg-gradient-to-b from-white via-white to-stone-100 md:text-center">
<Container>
<div class="py-16">
<div class="py-16 min-h-[50vh] flex justify-center items-center">
<div class="text-center">
<div class="flex-shrink-0 flex justify-center"></div>
<H1>Stránka nenalezena</H1>
Expand Down

0 comments on commit 6aa925e

Please sign in to comment.