![]() |
controller as a subdomain - 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: controller as a subdomain (/showthread.php?tid=12328) |
controller as a subdomain - El Forum - 10-15-2008 [eluser]x386[/eluser] Is this possible to access controllers not only by site.com/controller and have something like this: controller.site.com? Thanks! controller as a subdomain - El Forum - 10-15-2008 [eluser]meigwilym[/eluser] Try the search - it works wonders! Subdomaining Mei controller as a subdomain - El Forum - 10-15-2008 [eluser]x386[/eluser] This is about redirecting user. I hate redirecting! Though, in the CPanel I have options for it. Anyway to access controller without redirecting via subdoamin? like: controller.domain.com will be same as domain.com/controller Thanks! controller as a subdomain - El Forum - 10-15-2008 [eluser]Colin Williams[/eluser] I would use mod_rewrite rules to the effect of (.*).domain.com/(.*) index.php/$1/$2 controller as a subdomain - El Forum - 10-15-2008 [eluser]x386[/eluser] Thanks Colin! What is this mod_rewrite and how to implement it? I googled it, but I didn't find anything interesting... controller as a subdomain - El Forum - 10-15-2008 [eluser]Colin Williams[/eluser] It's an Apache module that lets you rewrite URI requests. I'm not sure what Google you used ![]() controller as a subdomain - El Forum - 10-15-2008 [eluser]Colin Williams[/eluser] Also, the Router class is the ultimate controller in CI, so you could overload one or some of it's methods in your own MY_Router.php library and sniff out the subdomain before validating and routing the request controller as a subdomain - El Forum - 10-15-2008 [eluser]John_Betong[/eluser] [quote author="x386" date="1224079576"]Is this possible to access controllers not only by site.com/controller and have something like this: controller.site.com? Thanks![/quote] I use a sub-domain on this site http://iching.justjoolz.com and for me ![]() In my http://localhost I have a path to c:/www/iching/index.php and online I have http://iching.justjoolz.com/index.php index.php - common to both sites Code: ... Needless to say my config.php was setup with trial and error, if you want a copy let me know. |