Welcome Guest, Not a member yet? Register   Sign In
Nested CI installation doesn't work
#1

[eluser]nofearinc[/eluser]
I know this is a common problem - setting multiple installations - but I was unable to fix the issue.

I have 2 versions of a website - the second one is a translated copy-paste (no multilingual support required, user request). So:

http://mysite.com - this one works OK
http://mysite.com/en - this one doesn't.

I suppose there is an issue either in my .htaccess files or in my index.php. I've set the base path in config.php for both projects. I've extracted the application folders to the same depth as the system folders (so there are application, system, css, .htaccess, index.php etc). I've also removed the 'index.php' from the URL. Both projects work if alone at root level or only 1 of them is in a subdirectory.

Here there is the .htaccess for the first (root-positioned) project that works:

Code:
RewriteEngine On
RewriteCond $1 !^(index\.php|images|css|js|en|ckeditor|robots\.txt)
RewriteRule ^(.*)$ /index.php?/$1 [L]

AddType application/x-httpd-php5 .php
<IfModule mod_rewrite.c>
    RewriteBase /
    RewriteCond %{REQUEST_URI} ^system.*
    RewriteRule ^(.*)$ /index.php?/$1 [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)$ index.php?/$1 [L]
</IfModule>

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

I suppose there is some recursive rule that overlaps my nested app, but not sure - tested many different cases. As you see, I've excluded 'en' folder with my rule not to confuse with part of the first project.

This is the nested .htaccess:

Code:
RewriteEngine on

RewriteCond $1 !^(index\.php|images|css|js|ckeditor|robots\.txt)
RewriteRule ^(.*)$ en/index.php/$1 [L]

I've tried different rules - trailing or missing en, full path etc.

Any ideas? My index.php's are standard.


Messages In This Thread
Nested CI installation doesn't work - by El Forum - 08-21-2009, 08:47 AM
Nested CI installation doesn't work - by El Forum - 08-21-2009, 10:59 AM
Nested CI installation doesn't work - by El Forum - 08-21-2009, 03:44 PM
Nested CI installation doesn't work - by El Forum - 08-21-2009, 04:12 PM



Theme © iAndrew 2016 - Forum software by © MyBB