Welcome Guest, Not a member yet? Register   Sign In
How do I? one Application, multiple subdomains
#5

[eluser]dcheslow[/eluser]
Thanks to all,

Evan, that posting refers to is almost exactly the opposite of what I want to do. That post is talking about mapping different subdomains to DIFFERENT controllers. What I was asking about was mapping different subdomains to the SAME controllers (after setting a variable).

It ended up being pretty easy...

1) I set up a subdomain called 'mypath',
2) copied index.php into the '/mypath/' directory,
3) changed the value of the defined value'system' to '../system',
4) parse out the subdomain name and save it in a $_REQUEST variable

.... everything else just worked out... SWEET!

I had a bit of trouble configuring for the development environment... couldn't get 'mypath.localhost:8888' to parse out correctly. Fortunately, I just use my handy-dandy site object to rewrite the value of '$myself' so that I can use the subdirectory notation in development:

localhost:8888/mypath/index.php

When I switch to the server with the subdomains defined, it just magically starts translating.

I love codeigniter <<insert misty-eyed sentimentality here >>


Messages In This Thread
How do I? one Application, multiple subdomains - by El Forum - 06-07-2008, 12:08 PM
How do I? one Application, multiple subdomains - by El Forum - 06-07-2008, 12:48 PM
How do I? one Application, multiple subdomains - by El Forum - 06-09-2008, 08:13 AM
How do I? one Application, multiple subdomains - by El Forum - 06-09-2008, 09:54 AM
How do I? one Application, multiple subdomains - by El Forum - 06-09-2008, 10:17 AM



Theme © iAndrew 2016 - Forum software by © MyBB