User Tools

Site Tools


code_igniter

This is an old revision of the document!


code igniter

multiple sites, same code

Folders for the code igniter core.

  • /var/www
    • ci
      • application
      • system

Folders for the custom application.

  • /var/www
    • myapp
      • application
      • index.php

Change in /var/www/myapp/index.php :

  $system_path = '../ci/system';

rewrite rules

<IfModule mod_rewrite.c>
    RewriteEngine on

    RewriteCond %{REQUEST_URI} ^system.*
    RewriteCond $1 !^(index\.php|images|robots\.txt|css)
    RewriteRule ^(.*)$   index.php?/$1  [L]

    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)$   index.php?/$1  [L]
</IfModule>

code_igniter.1635858090.txt.gz · Last modified: (external edit)