allow_override:
- None
directoryindex: 'index.html'
+# neu
+ custom_fragment: 'AddType text/plain .tmpl'
+ rewrites:
+ - comment: 'frontend root rewrite'
+ rewrite_cond:
+ - '%{REQUEST_URI} ^/$'
+ rewrite_rule:
+ - '.* /index.html [END]'
+ - comment: 'frontend rewrites'
+ rewrite_rule:
+ - '^code/(modernizr-custom.js|spar-checker-min.css|spar-checker-min.js|selection.json)$ - [L]'
+ - '^code/(modernizr-custom|spar-checker-min|selection)-v[0-9]{1,4}\.(js|css|json)$ /code/$1.$2 [END]'
+ - '^media/(.*)-v[0-9]{1,4}\.(svg|jpg|png|gif)$ /media/$1.$2 [END]'
+ - '^media/(.*)\.(svg|jpg|png|gif)$ - [L]'
+ - '^code/.*\.(tmpl|eot|svg|ttf|woff|woff2)$ - [L]'
+ - '^((401|403|404|500)\.html)$ - [L]'
+ - '^(favicon-[0-9]{2}.ico)$ - [L]'
+ - '^(favicon-[0-9]{2}x[0-9]{2}.png)$ - [L]'
+ - '^(favicon.ico)$ - [L]'
+ - '^(sitemap.xml)$ - [L]'
+ - '^(robots.txt)$ - [L]'
+ - '^(manifest.json)$ - [L]'
+ - '^(browserconfig.xml)$ - [L]'
+ - '^(android-chrome-[0-9]{2,3}x[0-9]{2,3}.png)$ - [L]'
+ - '^(apple-touch-icon-[0-9]{2,3}x[0-9]{2,3}.png)$ - [L]'
+ - '^(apple-touch-icon-precompose.png)$ - [L]'
+ - '^(apple-touch-icon.png)$ - [L]'
+ - '^(mstile-[0-9]{2,3}x[0-9]{2,3}.png)$ - [L]'
+ - '^(opera_160.png)$ - [L]'
+ - '.* /404.html [R=404,L]'
+
- provider: location
path: '/'
limit_except:
- FollowSymLinks
allow_override:
- None
- directoryindex: 'index.php index.html'
- - provider: filesmatch
- path: '\.(ttf|otf|eot|woff)$'
- headers:
- - 'always set Access-Control-Allow-Origin "*"'
+ directoryindex: 'index.php'
+# alt
+# rewrites:
+# - comment: 'sfp files'
+# rewrite_cond:
+# - '%%{ich-trickse}{REQUEST_FILENAME} -s [OR]'
+# - '%%{ich-trickse}{REQUEST_FILENAME} -l [OR]'
+# - '%%{ich-trickse}{REQUEST_FILENAME} -d'
+# rewrite_rule:
+# - '^.*$ - [L]'
+# - comment: 'sfp rebase'
+# rewrite_cond:
+# - '%%{ich-trickse}{REQUEST_URI}::$1 ^(/.+)/(.*)::\2$'
+# rewrite_rule:
+# - '^(.*) - [E=BASE:%1]'
+# - comment: 'sfp index'
+# rewrite_rule:
+# - '^(.*)$ %%{ich-trickse}{ENV:BASE}/index.php [L]'
+# neu
rewrites:
- - comment: 'sfp files'
- rewrite_cond:
- - '%%{ich-trickse}{REQUEST_FILENAME} -s [OR]'
- - '%%{ich-trickse}{REQUEST_FILENAME} -l [OR]'
- - '%%{ich-trickse}{REQUEST_FILENAME} -d'
- rewrite_rule:
- - '^.*$ - [L]'
- - comment: 'sfp rebase'
- rewrite_cond:
- - '%%{ich-trickse}{REQUEST_URI}::$1 ^(/.+)/(.*)::\2$'
+ - comment: 'sfp rewrites'
rewrite_rule:
- - '^(.*) - [E=BASE:%1]'
- - comment: 'sfp index'
- rewrite_rule:
- - '^(.*)$ %%{ich-trickse}{ENV:BASE}/index.php [L]'
+ - 'code/.*(css|js|eot|index.php|svg|ttf|woff|woff2)$ - [L]'
+ - '.* /sfp/index.php [END]'
+
- provider: directory
path: '/var/www/spar-checker/sparchecker-backend/public/api/'
addhandlers:
- FollowSymLinks
allow_override:
- None
- directoryindex: 'index.php index.html'
+ directoryindex: 'index.php'
+# rewrites:
+# - comment: 'api files'
+# rewrite_cond:
+# - '%%{ich-trickse}{REQUEST_FILENAME} -s [OR]'
+# - '%%{ich-trickse}{REQUEST_FILENAME} -l [OR]'
+# - '%%{ich-trickse}{REQUEST_FILENAME} -d'
+# rewrite_rule:
+# - '^.*$ - [L]'
+# - comment: 'api rebase'
+# rewrite_cond:
+# - '%%{ich-trickse}{REQUEST_URI}::$1 ^(/.+)/(.*)::\2$'
+# rewrite_rule:
+# - '^(.*) - [E=BASE:%1]'
+# - comment: 'api index'
+# rewrite_rule:
+# - '^(.*)$ %%{ich-trickse}{ENV:BASE}/index.php [L]'
+# neu
rewrites:
- - comment: 'api files'
- rewrite_cond:
- - '%%{ich-trickse}{REQUEST_FILENAME} -s [OR]'
- - '%%{ich-trickse}{REQUEST_FILENAME} -l [OR]'
- - '%%{ich-trickse}{REQUEST_FILENAME} -d'
- rewrite_rule:
- - '^.*$ - [L]'
- - comment: 'api rebase'
- rewrite_cond:
- - '%%{ich-trickse}{REQUEST_URI}::$1 ^(/.+)/(.*)::\2$'
- rewrite_rule:
- - '^(.*) - [E=BASE:%1]'
- - comment: 'api index'
+ - comment: 'api rewrites'
rewrite_rule:
- - '^(.*)$ %%{ich-trickse}{ENV:BASE}/index.php [L]'
+ - '^v1/[/[:alnum:]]{2,30}$ /api/index.php [END]'
+ - '.* /404.html [R=404,L]'
+
+ - provider: filesmatch
+ path: '\.(ttf|otf|eot|woff)$'
+ headers:
+ - 'always set Access-Control-Allow-Origin "*"'
rewrites:
- comment: 'Alle Aliase auf Servername'
rewrite_cond:
- 'HTTPS on HTTPS=on'
- 'X-Forwarded-For ^80.146.239.2 admin_ip_range'
- 'X-Forwarded-For 192.168.15.1[89] admin_ip_range'
+ - 'X-Forwarded-For 130.180.83.190 admin_ip_range'
error_documents:
- { error_code: 401 , document: "/401.html" }
- { error_code: 403 , document: "/403.html" }
allow_override:
- None
directoryindex: 'index.html'
+# neu
+ custom_fragment: 'AddType text/plain .tmpl'
+ rewrites:
+ - comment: 'frontend root rewrite'
+ rewrite_cond:
+ - '%{REQUEST_URI} ^/$'
+ rewrite_rule:
+ - '.* /index.html [END]'
+ - comment: 'frontend rewrites'
+ rewrite_rule:
+ - '^code/(modernizr-custom.js|spar-checker-min.css|spar-checker-min.js|selection.json)$ - [L]'
+ - '^code/(modernizr-custom|spar-checker-min|selection)-v[0-9]{1,4}\.(js|css|json)$ /code/$1.$2 [END]'
+ - '^media/(.*)-v[0-9]{1,4}\.(svg|jpg|png|gif)$ /media/$1.$2 [END]'
+ - '^media/(.*)\.(svg|jpg|png|gif)$ - [L]'
+ - '^code/.*\.(tmpl|eot|svg|ttf|woff|woff2)$ - [L]'
+ - '^((401|403|404|500)\.html)$ - [L]'
+ - '^(favicon-[0-9]{2}.ico)$ - [L]'
+ - '^(favicon-[0-9]{2}x[0-9]{2}.png)$ - [L]'
+ - '^(favicon.ico)$ - [L]'
+ - '^(sitemap.xml)$ - [L]'
+ - '^(robots.txt)$ - [L]'
+ - '^(manifest.json)$ - [L]'
+ - '^(browserconfig.xml)$ - [L]'
+ - '^(android-chrome-[0-9]{2,3}x[0-9]{2,3}.png)$ - [L]'
+ - '^(apple-touch-icon-[0-9]{2,3}x[0-9]{2,3}.png)$ - [L]'
+ - '^(apple-touch-icon-precompose.png)$ - [L]'
+ - '^(apple-touch-icon.png)$ - [L]'
+ - '^(mstile-[0-9]{2,3}x[0-9]{2,3}.png)$ - [L]'
+ - '^(opera_160.png)$ - [L]'
+ - '.* /404.html [R=404,L]'
+
- provider: location
path: '/'
limit_except:
requires:
- 'valid-user'
- 'env admin_ip_range'
-# - provider: location
-# path: '/api'
- provider: location
path: '/sfp'
auth_type: Digest
- FollowSymLinks
allow_override:
- None
- directoryindex: 'index.php index.html'
+ directoryindex: 'index.php'
+# alt
+# rewrites:
+# - comment: 'sfp files'
+# rewrite_cond:
+# - '%%{ich-trickse}{REQUEST_FILENAME} -s [OR]'
+# - '%%{ich-trickse}{REQUEST_FILENAME} -l [OR]'
+# - '%%{ich-trickse}{REQUEST_FILENAME} -d'
+# rewrite_rule:
+# - '^.*$ - [L]'
+# - comment: 'sfp rebase'
+# rewrite_cond:
+# - '%%{ich-trickse}{REQUEST_URI}::$1 ^(/.+)/(.*)::\2$'
+# rewrite_rule:
+# - '^(.*) - [E=BASE:%1]'
+# - comment: 'sfp index'
+# rewrite_rule:
+# - '^(.*)$ %%{ich-trickse}{ENV:BASE}/index.php [L]'
+# neu
rewrites:
- - comment: 'sfp files'
- rewrite_cond:
- - '%%{ich-trickse}{REQUEST_FILENAME} -s [OR]'
- - '%%{ich-trickse}{REQUEST_FILENAME} -l [OR]'
- - '%%{ich-trickse}{REQUEST_FILENAME} -d'
- rewrite_rule:
- - '^.*$ - [L]'
- - comment: 'sfp rebase'
- rewrite_cond:
- - '%%{ich-trickse}{REQUEST_URI}::$1 ^(/.+)/(.*)::\2$'
+ - comment: 'sfp rewrites'
rewrite_rule:
- - '^(.*) - [E=BASE:%1]'
- - comment: 'sfp index'
- rewrite_rule:
- - '^(.*)$ %%{ich-trickse}{ENV:BASE}/index.php [L]'
+ - 'code/.*(css|js|eot|index.php|svg|ttf|woff|woff2)$ - [L]'
+ - '.* /sfp/index.php [END]'
+
- provider: directory
path: '/var/www/spar-checker/sparchecker-backend/public/api/'
addhandlers:
- FollowSymLinks
allow_override:
- None
- directoryindex: 'index.php index.html'
+ directoryindex: 'index.php'
+# alt
+# rewrites:
+# - comment: 'api files'
+# rewrite_cond:
+# - '%%{ich-trickse}{REQUEST_FILENAME} -s [OR]'
+# - '%%{ich-trickse}{REQUEST_FILENAME} -l [OR]'
+# - '%%{ich-trickse}{REQUEST_FILENAME} -d'
+# rewrite_rule:
+# - '^.*$ - [L]'
+# - comment: 'api rebase'
+# rewrite_cond:
+# - '%%{ich-trickse}{REQUEST_URI}::$1 ^(/.+)/(.*)::\2$'
+# rewrite_rule:
+# - '^(.*) - [E=BASE:%1]'
+# - comment: 'api index'
+# rewrite_rule:
+# - '^(.*)$ %%{ich-trickse}{ENV:BASE}/index.php [L]'
+# neu
rewrites:
- - comment: 'api files'
- rewrite_cond:
- - '%%{ich-trickse}{REQUEST_FILENAME} -s [OR]'
- - '%%{ich-trickse}{REQUEST_FILENAME} -l [OR]'
- - '%%{ich-trickse}{REQUEST_FILENAME} -d'
+ - comment: 'api rewrites'
rewrite_rule:
- - '^.*$ - [L]'
- - comment: 'api rebase'
- rewrite_cond:
- - '%%{ich-trickse}{REQUEST_URI}::$1 ^(/.+)/(.*)::\2$'
- rewrite_rule:
- - '^(.*) - [E=BASE:%1]'
- - comment: 'api index'
- rewrite_rule:
- - '^(.*)$ %%{ich-trickse}{ENV:BASE}/index.php [L]'
+ - '^v1/[/[:alnum:]]{2,30}$ /api/index.php [END]'
+ - '.* /404.html [R=404,L]'
+
- provider: filesmatch
path: '\.(ttf|otf|eot|woff)$'
headers: