CodeIgniter Forums
[emergency] my second application doesn't run... - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forum-5.html)
+--- Forum: General Help (https://forum.codeigniter.com/forum-24.html)
+--- Thread: [emergency] my second application doesn't run... (/thread-64028.html)



[emergency] my second application doesn't run... - lama - 01-05-2016

Hello,

I have a website on live server with CI 2.2.6 with two apps :
  • /frontend
  • /admin
  • /system

I set this in both application
PHP Code:
$config['enable_query_strings'] = FALSE;
$config['uri_protocol']    = 'REQUEST_URI';
$config['index_page'] = ''

in admin/index.php I set
PHP Code:
$system_path '../system';
$application_folder '../admin'

in admin/.htaccess
PHP Code:
RewriteEngine on
RewriteCond 
$!^(index\.php|admin|images|assets|favicon\.ico|rss\.xml|sitemap\.xml|BingSiteAuth\.xml|robots\.txt)
RewriteRule ^(.*)$ index.php/$[L

I can access to all frontend page that is the default application. But when I go to /admin i can see the admin default layout but its always the default 404 error controller that is loaded whatever the link I clicked on.

This is working on localhost (php 5.5.26) but not on live server (php 5.5.9).

This is working on localhost but not on live server.

Any help is appreciated Smile

Thanks


RE: [emergency] my second application doesn't run... - skunkbad - 01-05-2016

base_url in each app configured correctly?


RE: [emergency] my second application doesn't run... - lama - 01-06-2016

Hi,

PHP Code:
// in admin
$config['base_url']    = 'http://www.monsite.com/admin/';

// in frontend
$config['base_url']    = 'http://www.mysite.com/'


I tryed this .htaccess in /admin

PHP Code:
<IfModule mod_rewrite.c>
    
Options +FollowSymLinks
    Options 
-Indexes
    RewriteEngine On
    RewriteBase 
/

    
RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond 
%{REQUEST_FILENAME} !-d

    RewriteCond 
$!^(index\.php|admin|images|assets|favicon\.ico|rss\.xml|sitemap\.xml|BingSiteAuth\.xml|robots\.txt)

    
RewriteRule ^(.*)$ index.php [L]
</
IfModule

I get the message "Directory access is forbidden." so that the index.html that is loaded... BUT other pages works when I type the url Any idea ?