DMS-KH
DMS-KH

Reputation: 2797

How can I create another website inside of Codeigniter?

I'm using CI3 to creatge website and make a dome for my manager to check it which placed inside of another CI website as below directory

I hosting this website on Linux server.

This is directories: first web: var/www/html/webiste_one second web: var/www/html/website_one/website_demo (This is website used for demo)

But the finally I got error pages not found 404

and here is my .htaccess

# Set PHP Time Zone:
#SetEnv TZ America/New_York
<IfModule mod_rewrite.c>
#Option +FollowSymlinks
RewriteEngine On
RewriteBase /webiste_one/website_demo/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-l
RewriteRule ^(.*)$ index.php?/$1 [QSA,L]

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

Thanks you

Upvotes: 0

Views: 126

Answers (1)

Lirux
Lirux

Reputation: 169

[Edit] Extended answer.

It's possible to have multiple application with one codeigniter installation.

For example you want to create two applications "foo" and "bar"

applications/foo/
applications/foo/config/
applications/foo/controllers/
applications/foo/libraries/
applications/foo/models/
applications/foo/views/
applications/bar/
applications/bar/config/
applications/bar/controllers/
applications/bar/libraries/
applications/bar/models/
applications/bar/views/

Each application needs a seperate index.php file. Just change each $application_folder to the correct path.

http://www.codeigniter.com/userguide3/general/managing_apps.html

Upvotes: 1

Related Questions