I'm trying to use one install of Kohana to manage two separate sites rather than just duplicate the install. I have directories like this:
applications/
app1/
app2/
The .htaccess I have looks like this:
RewriteEngine on
RedirectMatch app1/(.*)$ http://app1.example.com/$1
RewriteCond %{REQUEST_FILENAME} !.*applications/app1.*
RewriteRule .* applications/app1/index.php/$0 [PT]
When I go to app1.example.com
I get a 500 infinite redirect and the URL is app1.example.com/index.php/index.php/index.php/...
What I need is for it to look like it's going to app1.example.com
but behind the scenes it is redirecting to document_root/applications/app1/index.php
.
I also need this to work for app2 in the same way, but I imagine once I have it working for app1 it will essentially be identical.
If you want to throw in any tips on managing multiple sites with one Kohana install that would help too.
RedirectMatch
in there?