Skip to content
WJunction - Webmaster Forum

.htaccess gurus

Status
Not open for further replies.
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
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>
 
Status
Not open for further replies.

About the author

S
Active Member · Joined
2,474
Messages
240
Reactions
63
Points

Advertise on WJunction

Reach 1000's of webmasters, hosts & affiliates. Banner & sponsored-thread slots available.

Contact us
Back
Top Bottom