Thanks for the effort, but i already did it.
Code:
RewriteCond %{DOCUMENT_ROOT}/apps/%{HTTP_HOST}/$1 -f
RewriteRule ^(.*)$ /apps/%{HTTP_HOST}/$1 [L]
RewriteCond %{DOCUMENT_ROOT}/apps/%{HTTP_HOST}/$1 -d
RewriteRule ^(.*)$ /apps/%{HTTP_HOST}/$1 [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /index.php?/$1 [L]
Yeah, i could use [OR] statement in one block instead of two for the first 2 but it was throwing 500, dont know why. But this solution is working just great.
No, %{DOCUMENT_ROOT} is not my server root, that was a misunderstanding by my fault. But it's the root for my PHP Framework.
apps
domain.com
domain2.com
domain3.com
system
index.php
That's why i was needed that rule, so i can server directly from those subfolders just like in a normal virtual host
Bookmarks