fix(routing): serve root apps (dinos, plants) and fallback assets
This commit is contained in:
parent
8413a6c2e0
commit
0a9befbae9
1 changed files with 14 additions and 8 deletions
22
.htaccess
22
.htaccess
|
|
@ -1,5 +1,5 @@
|
|||
# DATEI: ./.htaccess
|
||||
Options -Indexes
|
||||
Options -Indexes +FollowSymLinks
|
||||
RewriteEngine On
|
||||
|
||||
# Interne PHP- und Template-Verzeichnisse vor direktem Webzugriff sperren
|
||||
|
|
@ -14,17 +14,23 @@ RewriteRule ^(home|philcore)/(app|core|views|src)/ - [F,L]
|
|||
Require all denied
|
||||
</Files>
|
||||
|
||||
# 1. Dynamische XML/TXT Dateien -> Ab zum SeoController
|
||||
# 1. Assets aus home/public weiterleiten (falls direkt aufgerufen wie /css/style.css)
|
||||
RewriteCond %{REQUEST_FILENAME} !-f
|
||||
RewriteCond %{DOCUMENT_ROOT}/home/public/$1 -f [OR]
|
||||
RewriteCond %{DOCUMENT_ROOT}/home/public/$1 -d
|
||||
RewriteRule ^(.*)$ home/public/$1 [L]
|
||||
|
||||
# 2. Dynamische XML/TXT Dateien -> Ab zum SeoController
|
||||
RewriteRule ^sitemap\.xml$ home/public/index.php?url=seo/sitemap [L,QSA]
|
||||
RewriteRule ^robots\.txt$ home/public/index.php?url=seo/robots [L,QSA]
|
||||
|
||||
# 2. Domain-Einstieg
|
||||
# 3. Domain-Einstieg
|
||||
RewriteRule ^$ home/public/index.php [L]
|
||||
|
||||
# 3. Echte Assets schützen
|
||||
RewriteCond %{REQUEST_FILENAME} !-f
|
||||
RewriteCond %{REQUEST_FILENAME} !-d
|
||||
RewriteCond %{REQUEST_URI} !^/home/public/
|
||||
# 4. Echte Verzeichnisse/Dateien im Root (dinos, plants, etc.) direkt bedienen
|
||||
RewriteCond %{REQUEST_FILENAME} -f [OR]
|
||||
RewriteCond %{REQUEST_FILENAME} -d
|
||||
RewriteRule ^ - [L]
|
||||
|
||||
# 4. Globales Routing
|
||||
# 5. Globales Routing ans Portfolio
|
||||
RewriteRule ^(.*)$ home/public/index.php?url=$1 [L,QSA]
|
||||
Loading…
Reference in a new issue