Welcome Guest, Not a member yet? Register   Sign In
set up multiple applications
#1

Hi,
Here's my context : codeigniter 3 on wamp.
Here's my problem :
  • I have two environments (production and test).
  • I have one source code for each environment.
  • In each environment I can have multiple applications sharing the same source code (one application/environment is associated to a group of databases).
  • Currently the server is located on my machine
I created the following source tree for my files in www/code_igniter directory :
  • applications (directory)
  • assets (directory)
  • system directory (of codeigniter)
  • .htaccess file (for removing index.php from url)
  • index.php
Content of applications directory :
  • application test (directory)
  • application prod
each applications directory contains the files and directories of codeigniter application directory (cache,config, controllers, core,...etc)

I want to run my applications by using the following url : http://localhost/<application_name>_<environment>
I don't succeed in making the access to my application work ("I've got The requested URL was not found on this server").
I'm lost in the configuration of index.php, .htaccess, routes.php, config.php

In index.php, I parse $_SERVER['REQUEST_URI'] to set $application_folder value and database credentials
In .htaccess i set :
Code:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L]
</IfModule>

in config.php I set :
Code:
$config['base_url'] = 'http://localhost'; and $config['index_page'] = '';

Did I make the good choices for my source tree ?
How should I configure the files index.php, .htaccess, routes.php, config.php ?

Please help me
Reply


Messages In This Thread
set up multiple applications - by fredg - 01-14-2020, 08:38 AM
RE: set up multiple applications - by fredg - 01-16-2020, 04:04 AM
RE: set up multiple applications - by php_rocs - 01-16-2020, 11:43 AM
RE: set up multiple applications - by fredg - 01-16-2020, 01:21 PM
RE: set up multiple applications - by jreklund - 01-16-2020, 11:49 AM
RE: set up multiple applications - by fredg - 01-16-2020, 01:31 PM
RE: set up multiple applications - by fredg - 01-17-2020, 01:39 AM
RE: set up multiple applications - by fredg - 01-17-2020, 04:59 AM



Theme © iAndrew 2016 - Forum software by © MyBB