Ok, I havent done a .htaccess in years (nginx FTW). Anyway anyone here able to improve my .htaccess, it doesnt allways work atm and is just generally bad.
Logic:
1. If file exists in /static/ service
2. If path is /system/ or /app/ serve from within /system/ or /app/
2. Else send to /system/bin/handle.php
Current attempt
Logic:
1. If file exists in /static/ service
2. If path is /system/ or /app/ serve from within /system/ or /app/
2. Else send to /system/bin/handle.php
Current attempt
Code:
Options +FollowSymLinks +ExecCGI
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_URI} ^(?!/static/).+ [NC]
RewriteCond %{DOCUMENT_ROOT}/static/$1 -f
RewriteRule ^(.*) %{DOCUMENT_ROOT}/static/$1 [L]
RewriteCond %{REQUEST_URI} ^(?!/system/).+ [NC]
RewriteCond %{REQUEST_URI} ^(?!/static/).+ [NC]
RewriteRule ^(.*)$ system/bin/handle.php [QSA,L]
</IfModule>