Weitere Netcup-Anpassungen
This commit is contained in:
parent
025bbb1bf9
commit
225e5d676a
6 changed files with 38 additions and 14 deletions
16
.htaccess
16
.htaccess
|
@ -1,13 +1,8 @@
|
||||||
# Charset
|
# Charset
|
||||||
AddDefaultCharset UTF-8
|
AddDefaultCharset UTF-8
|
||||||
|
|
||||||
# Enable gzip
|
|
||||||
<IfModule mod_deflate.c>
|
|
||||||
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
|
|
||||||
</IfModule>
|
|
||||||
|
|
||||||
# Site-Icon Rules
|
# Site-Icon Rules
|
||||||
RewriteRule ^favicon\.ico$ img/favicon.ico [R=301,L]
|
RewriteRule ^favicon\.ico$ /img/favicon.ico [L]
|
||||||
|
|
||||||
# Caching
|
# Caching
|
||||||
<IfModule mod_expires.c>
|
<IfModule mod_expires.c>
|
||||||
|
@ -19,8 +14,6 @@ RewriteRule ^favicon\.ico$ img/favicon.ico [R=301,L]
|
||||||
</FilesMatch>
|
</FilesMatch>
|
||||||
</IfModule>
|
</IfModule>
|
||||||
|
|
||||||
DirectoryIndex index.html index.htm
|
|
||||||
|
|
||||||
# Robots.txt
|
# Robots.txt
|
||||||
<Files "robots.txt">
|
<Files "robots.txt">
|
||||||
Allow from all
|
Allow from all
|
||||||
|
@ -28,14 +21,9 @@ DirectoryIndex index.html index.htm
|
||||||
Satisfy all
|
Satisfy all
|
||||||
</Files>
|
</Files>
|
||||||
|
|
||||||
# Shorturl
|
|
||||||
RewriteRule ^[a-zA-Z0-9]{6}$ https://go.p-schwarz.de [P]
|
|
||||||
|
|
||||||
# Spaceapi
|
# Spaceapi
|
||||||
RewriteRule ^spaceapi.json$ /spaceapi/ [R=302,L]
|
RewriteRule ^spaceapi.json$ /spaceapi/ [R=302,L]
|
||||||
RewriteRule ^spaceapi$ /spaceapi/ [R=302,L]
|
RewriteRule ^spaceapi$ /spaceapi/ [R=302,L]
|
||||||
RewriteRule ^spaceapi/(.*)$ https://spaceapi.ctbk.de/$1 [P]
|
|
||||||
|
|
||||||
# Hackcal
|
# Hackcal
|
||||||
RewriteRule ^hackcal$ /hackcal/ [R=302,L]
|
RewriteRule ^hackcal$ /hackcal/ [R=302,L]
|
||||||
RewriteRule ^hackcal/(.*)$ https://hackcal.ctbk.de/$1 [P]
|
|
29
README.md
29
README.md
|
@ -30,8 +30,37 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
index index.html index.htm;
|
index index.html index.htm;
|
||||||
|
|
||||||
|
location = /robots.txt {
|
||||||
|
allow all;
|
||||||
|
log_not_found off;
|
||||||
|
access_log off;
|
||||||
|
}
|
||||||
|
|
||||||
|
# Spaceapi
|
||||||
|
location = /spaceapi.json {
|
||||||
|
return 302 /spaceapi/;
|
||||||
|
}
|
||||||
|
location = /spaceapi {
|
||||||
|
return 302 /spaceapi/;
|
||||||
|
}
|
||||||
|
location /spaceapi/ {
|
||||||
|
proxy_pass https://spaceapi.ctbk.de/;
|
||||||
|
}
|
||||||
|
|
||||||
|
# Hackcal
|
||||||
|
location = /hackcal {
|
||||||
|
return 302 /hackcal/;
|
||||||
|
}
|
||||||
|
location /hackcal/ {
|
||||||
|
proxy_pass https://hackcal.ctbk.de/;
|
||||||
|
}
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## Apache/Netcup
|
||||||
|
Da Netcup keine nginx Configanpassungen und kein Reverse Proxy zulässt, gibt es noch eine .htaccess und die Ordner spaceapi und hackcal mit jeweils einem Proxyscript
|
||||||
|
|
||||||
## Minify resources
|
## Minify resources
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
4
hackcal/index.php
Normal file
4
hackcal/index.php
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
<?php
|
||||||
|
header('Content-Type: application/json');
|
||||||
|
$period = max(filter_input(INPUT_GET, 'period', FILTER_VALIDATE_INT, array('options' => array('min_range' => 1, 'max_range' => 12))), 1);
|
||||||
|
echo file_get_contents("https://hackcal.ctbk.de/?period=".$period);
|
BIN
spaceapi/closed.png
Normal file
BIN
spaceapi/closed.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 3 KiB |
3
spaceapi/index.php
Normal file
3
spaceapi/index.php
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
<?php
|
||||||
|
header('Content-Type: application/json');
|
||||||
|
echo file_get_contents("https://spaceapi.ctbk.de/");
|
BIN
spaceapi/open.png
Normal file
BIN
spaceapi/open.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.8 KiB |
Reference in a new issue