Ok…I have the folloing setup working perfectly with no adjustment to any CI code:
Directory layout:
/var/
|
|-www/
|
|-commonlibs
| |
| |-CodeIgniter_1.5.3/
| |
| |-system/
|
|-html/ (httpd document root)
|
|-.htaccess
|
|-index.php (primary front controller)
|
|-application/ (primary CI application code)
|
|-subdir/
|
|-index.php (subdir front controller)
|
|-application/ (subdir CI application code)
With nothing in the .htaccess file, and leaving default_controller as ‘welcome’ on both applications, I can go to the following URLs with no problem:
> http://www.mysite.com/ (loads primary front controller defaulting to the welcome controller and the index() method of that controller)
> http://www.mysite.com/index.php (loads primary front controller defaulting to the welcome controller and the index() method of that controller)
> http://www.mysite.com/index.php/welcome (loads primary front controller, welcome controller, defaulting to the index() method of that controller)
> http://www.mysite.com/index.php/welcome/index (loads primary front controller, welcome controller, index() method of that controller)
> http://www.mysite.com/subdir (loads subdir front controller defaulting to the subdir application’s welcome controller and the index() method of that controller)
> http://www.mysite.com/subdir/index.php (loads subdir front controller defaulting to the subdir application’s welcome controller and the index() method of that controller)
> http://www.mysite.com/subdir/index.php/welcome (loads subdir front controller, the subdir application’s welcome controller defaulting to the index() method of that controller)
> http://www.mysite.com/subdir/welcome/index (loads subdir front controller, the subdir application’s welcome controller, the index() method of that controller)
Putting the folllowing into .htaccess:
RewriteEngine On
RewriteCond %{REQUEST_URI} ^/subdir/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^subdir/(.*)$ subdir/index.php/$1 [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L]
allows me to go to the EXACT same URLs as I listed above, but I can pull index.php out of any of them and it still works fine.
So I am seeing no problem with front controllers (bootstrap files) in subdirs. Did I miss something in what you guys are doing that is causing the problem? If so, give me some instructions on what to do to my test cases to make it fail.
Thanks,
Jim