CodeIgniter Forums
seperate codeigniter app for admin area - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: seperate codeigniter app for admin area (/showthread.php?tid=54331)



seperate codeigniter app for admin area - El Forum - 09-04-2012

[eluser]knnktr[/eluser]
hey guys,

i'm having a problem with url rewriting and using two seperate codeigniter installations.

there might be a better way to do this as well.

'/user-name/admin' needs to load one codeigniter installation
'/user-name/anything-else' needs to load a different installation

where 'user-name' is variable.

my motiviation is that the admin area of my app is a whole beast on it's own so i want to keep the two seperate.

been trying to get this right with my .htaccess but no luck Sad


seperate codeigniter app for admin area - El Forum - 09-04-2012

[eluser]vbsaltydog[/eluser]
What is the benefit of a separate CI app for the admin side?

It doubles your workload for configuration and upgrades.

You should look into public and private controllers and/or forcing admin login based on the URI via MY_Controller


seperate codeigniter app for admin area - El Forum - 09-04-2012

[eluser]boltsabre[/eluser]
Or, as many companies do, host your "admin" on a completely separate url with a bunch of white listed IP addresses, if the user doesn't know the url, and isn't coming from a pre-approved white list, they cannot get access to your admin (obviously you'd still want a fully integrated and secure login mechanism). Also completely block the entire domain with your robots.txt file, it will stop your admin site from popping up search engine results.


seperate codeigniter app for admin area - El Forum - 09-05-2012

[eluser]knnktr[/eluser]
yeah - it's basically a separation of interests.

i think i might just go with a different domain entirely.

event if it's just admin.app.com/user/


seperate codeigniter app for admin area - El Forum - 09-05-2012

[eluser]knnktr[/eluser]
now that i think about it, the main problem is that wildcard SSL is damned expensive.

and everything needs to be on https for this app.

so i can't have user.app.com

it has to be app.com/user

but i'm cool having admin.app.com/user as well