From 025bbb1bf968a82e93d3edda136d1b93250cc73b Mon Sep 17 00:00:00 2001 From: Patrick Schwarz Date: Thu, 4 Apr 2024 23:04:39 +0200 Subject: [PATCH] Add .htaccess because netcup does not allow nginx config changes --- .htaccess | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 .htaccess diff --git a/.htaccess b/.htaccess new file mode 100644 index 0000000..5068849 --- /dev/null +++ b/.htaccess @@ -0,0 +1,41 @@ +# Charset +AddDefaultCharset UTF-8 + +# Enable gzip + + AddOutputFilterByType DEFLATE application/atom+xml application/javascript application/json application/ld+json application/manifest+json application/rss+xml application/vnd.geo+json application/vnd.ms-fontobject application/wasm application/x-font-ttf application/x-web-app-manifest+json application/xhtml+xml application/xml font/opentype image/bmp image/svg+xml image/x-icon text/cache-manifest text/css text/plain text/vcard text/vnd.rim.location.xloc text/vtt text/x-component text/x-cross-domain-policy + + +# Site-Icon Rules +RewriteRule ^favicon\.ico$ img/favicon.ico [R=301,L] + +# Caching + + + ExpiresActive on + ExpiresDefault "access plus 1 week" + Header append Cache-Control "public" + Header append Cache-Control "max-age=604800" + + + +DirectoryIndex index.html index.htm + +# Robots.txt + + Allow from all + Deny from none + Satisfy all + + +# Shorturl +RewriteRule ^[a-zA-Z0-9]{6}$ https://go.p-schwarz.de [P] + +# Spaceapi +RewriteRule ^spaceapi.json$ /spaceapi/ [R=302,L] +RewriteRule ^spaceapi$ /spaceapi/ [R=302,L] +RewriteRule ^spaceapi/(.*)$ https://spaceapi.ctbk.de/$1 [P] + +# Hackcal +RewriteRule ^hackcal$ /hackcal/ [R=302,L] +RewriteRule ^hackcal/(.*)$ https://hackcal.ctbk.de/$1 [P]