Rewrite file downloads in htaccess

This commit is contained in:
Steffen Lange 2024-02-29 10:40:29 +01:00
parent 8b32989a07
commit 88febcc15b
3 changed files with 11 additions and 3 deletions

View file

@ -1,3 +1,12 @@
<IfModule mod_alias.c>
RedirectMatch 404 ^/\.git
</IfModule>
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^$ feiertage.php [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^Feiertage([A-Za-z]*)([0-9]+)\.ics$ feiertage.php?jahr=$2&land=$1 [L]
</IfModule>

View file

@ -77,8 +77,8 @@ class Feiertag {
return false;
}
public function IsInBundesland(int $id) {
return in_array($id, $this->laender);
public function IsInBundesland(int $landId) {
return in_array($landId, $this->laender);
}
public function GetBundeslaender(string $sep = ', ', bool $short = false) {

View file

@ -1 +0,0 @@
feiertage.php