Multiple Applications |
[eluser]pickupman[/eluser]
Messed around for this for a quite awhile. Here's the cleanest solution. Create subdirectories in your root folder for each application /system /myfirstapp /mysecondapp index.php Next copy the application folder into each of the subfolders in root along with a copy of a index.php file. Folder structure is now. /system /myfirstapp /application index.php /mysecondapp /application index.php index.php Copy into each myapp subfolder a .htaccess file with contents Code: RewriteEngine On File structure now is /system /myfirstapp /application index.php .htaccess /mysecondapp /application index.php .htaccess index.php Then you need to open each index.php file in each of your apps folders and change the system folder. Code: $system_path = '../system'; This tells the application to look up into the root folder for CI. The only other tidbit is to add a .htaccess rule in your root folder to redirect a request without any uri segments (ie http://www.example.com/ => http://www.example.com/myfirstapp/) The problem with trying to use clean URLs by removing .php, the URI class is passing the wrong segments to the Router class. If you extend the URI class to change the offset of the URI, then the Router class can't find the controllers properly. |
Messages In This Thread |
Multiple Applications - by El Forum - 03-02-2011, 04:11 PM
Multiple Applications - by El Forum - 03-02-2011, 07:40 PM
Multiple Applications - by El Forum - 03-03-2011, 08:33 AM
Multiple Applications - by El Forum - 03-03-2011, 08:53 AM
Multiple Applications - by El Forum - 03-03-2011, 11:30 AM
Multiple Applications - by El Forum - 03-03-2011, 11:35 AM
Multiple Applications - by El Forum - 04-06-2011, 06:40 AM
Multiple Applications - by El Forum - 04-06-2011, 07:53 AM
Multiple Applications - by El Forum - 04-06-2011, 08:33 AM
Multiple Applications - by El Forum - 04-06-2011, 12:59 PM
Multiple Applications - by El Forum - 04-07-2011, 01:01 AM
Multiple Applications - by El Forum - 04-07-2011, 06:13 AM
|