CodeIgniter Forums
[SOLVED] Codeigniter in codeigniter - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5)
+--- Forum: General Help (https://forum.codeigniter.com/forumdisplay.php?fid=24)
+--- Thread: [SOLVED] Codeigniter in codeigniter (/showthread.php?tid=688)



[SOLVED] Codeigniter in codeigniter - Levian - 01-05-2015

Hi,

Well, new here n just diving into codeigniter for some months
I wonder if I can use codeigniter in both domain and subdomain...there wasn't any problem when it's on subdomains as they're separated...but as domain n subdomain...can it be done ?


Thanks n regards,


RE: Codeigniter in codeigniter - wolfgang1983 - 01-06-2015

(01-05-2015, 09:06 PM)Levian Wrote: Hi,

Well, new here n just diving into codeigniter for some months
I wonder if I can use codeigniter in both domain and subdomain...there wasn't any problem when it's on subdomains as they're separated...but as domain n subdomain...can it be done ?


Thanks n regards,

You will have to set in in htaccess some how. Try Place this htaccess in main directory or if not both.


PHP Code:
RewriteEngine on

RewriteCond 
%{REQUEST_FILENAME} !-# this means if the requested file name doesnt exist 
RewriteCond %{REQUEST_FILENAME} !-# this means if the requested directory doesnt exist 
RewriteRule ^(.*)$ index.php [L