Welcome Guest, Not a member yet? Register   Sign In
multiple sites, 1 codebase, using symlinks (with smarty)
#7

[eluser]E1M2[/eluser]
I've been going through the forum checking best strategies for multi app executions and I must say, this is a sweet setup.
I've set everything up as outlined (dir structure, symlinks etc.) but I do have a few potential differences:

INDEX.PHP
My local installation is housed at 'http://192.168.0.3/webapp' with a path of '/htdocs/webapp'
Here is how I've setup my application switch. Notice I am using the URI to then go to the approriate app directory.

Code:
$myApp = '';
$uriArr = explode("/", $_SERVER['REQUEST_URI']);

switch($uriArr[2])
{
    case 'cms':
        $myApp = 'www_cms';
        break;

    case 'id':
        $myApp = 'www_id';
        break;

    case 'test':
        $myApp = 'application';
        break;

    default:
        $myApp = 'application';
    }
    
$application_folder = $myApp;


PROBLEM
Issue is, whenever I then go to http://192.168.0.3/webapp/cms -OR- http://192.168.0.3/webapp/id even http://192.168.0.3/webapp/test I get a 404. http://192.168.0.3/webapp/ works fine.

I have not changed anything with the application constants in INDEX.PHP and my .htaccess (/htdocs/webapp) is as follows:

Code:
<IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /webapp
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)$ index.php/$1 [L]
</IfModule>

<IfModule !mod_rewrite.c>
    ErrorDocument 404 /index.php
</IfModule>

.htaccess in my app folders (www_cms, www_id)

Code:
Options +FollowSymLinks



CLOSING
I'm wondering if there is a step I'm missing. Possibly with the .htaccess in /webapp -OR- the index.php file itself. What are your thoughts?


Messages In This Thread
multiple sites, 1 codebase, using symlinks (with smarty) - by El Forum - 10-24-2007, 06:40 AM



Theme © iAndrew 2016 - Forum software by © MyBB