29 lines
795 B
ApacheConf
29 lines
795 B
ApacheConf
RewriteEngine On
|
|
RewriteBase /
|
|
Options +FollowSymlinks
|
|
Options -Indexes
|
|
|
|
RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC]
|
|
RewriteRule ^(.*)$ https://%1/$1 [R=301,L]
|
|
RewriteCond %{SERVER_PORT} !=443
|
|
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=permanent]
|
|
|
|
# Pliki TSV z feeds/ - serwuj statycznie
|
|
RewriteCond %{REQUEST_URI} ^/feeds/.+\.tsv$ [NC]
|
|
RewriteRule ^ - [L]
|
|
|
|
# Statyczne zasoby - pomijaj
|
|
RewriteCond %{REQUEST_URI} ^/(libraries|layout|upload|temp)/ [NC]
|
|
RewriteRule ^ - [L]
|
|
|
|
# Istniejące pliki - pomijaj (katalogi NIE, zeby /feeds trafialo do index.php)
|
|
RewriteCond %{REQUEST_FILENAME} -f
|
|
RewriteRule ^ - [L]
|
|
|
|
# Raporty klientow - serwuj statycznie
|
|
RewriteCond %{REQUEST_URI} ^/raporty/ [NC]
|
|
RewriteRule ^ - [L]
|
|
|
|
# Wszystko inne → index.php
|
|
RewriteRule ^(.*)$ index.php [L,QSA]
|