mirror of
https://github.com/tim-krehan/shopping-list.git
synced 2024-11-24 06:40:01 +01:00
58 lines
1.1 KiB
ApacheConf
58 lines
1.1 KiB
ApacheConf
<IfModule mod_rewrite.c>
|
|
#Rewrite Engine anschalten
|
|
RewriteEngine on
|
|
|
|
#normale Seiten ohne Unterverzeichnis (Liste, Rezeptliste, neues Rezept)
|
|
RewriteRule ^([a-zA-Z0-9-]+)$ ?site=$1
|
|
|
|
#alles, was versucht ein Script aufzurufen
|
|
RewriteRule /js/(.+) /js/$1
|
|
|
|
#Error Seite
|
|
RewriteRule ^error/([a-zA-Z0-9-_]+)$ ?site=error&id=$1
|
|
|
|
#Rezept Seite
|
|
RewriteRule ^recipe/([0-9]+)$ ?site=recipe&number=$1
|
|
|
|
#Rezept editieren
|
|
RewriteRule ^edit-recipe/([0-9]+)$ ?site=edit-recipe&number=$1
|
|
|
|
#Loginseite
|
|
RewriteRule ^login/url=(.+)$ ?site=login&refurl=$1
|
|
|
|
#API Calls
|
|
RewriteRule ^api/([\w-]+)/([\w-]+)$ php/api.php?site=api&call=$1&function=$2 [L]
|
|
</IfModule>
|
|
|
|
#Deny every *.php file
|
|
<Files *.php>
|
|
Order Deny,Allow
|
|
Deny from all
|
|
Allow from 127.0.0.1
|
|
</Files>
|
|
|
|
#allow following files
|
|
<Files index.php>
|
|
Order Allow,Deny
|
|
Allow from all
|
|
</Files>
|
|
|
|
<Files api.php>
|
|
Order Allow,Deny
|
|
Allow from all
|
|
</Files>
|
|
|
|
<Files login.php>
|
|
Order Allow,Deny
|
|
Allow from all
|
|
</Files>
|
|
|
|
<Files logout.php>
|
|
Order Allow,Deny
|
|
Allow from all
|
|
</Files>
|
|
|
|
<Files install*.php>
|
|
Order Allow,Deny
|
|
Allow from all
|
|
</Files>
|