User Tools

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>

This website uses cookies. By using the website, you agree with storing cookies on your computer. Also, you acknowledge that you have read and understand our Privacy Policy. If you do not agree, please leave the website.

More information