CodeIgniter Forums
modifying the codeigniter route structure - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forum-20.html)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forum-23.html)
+--- Thread: modifying the codeigniter route structure (/thread-9505.html)



modifying the codeigniter route structure - El Forum - 06-27-2008

[eluser]adamBouchard[/eluser]
Hi,

I am trying to achieve the following url structure similar to what you see if you have a basecamp account from 37 signals:

URL Goal:

customer_name.domain.com/project_name/controller/action

My current url structure is....

domain.com/controller/action/customer_name/project_name


Does anyone know the easiest way to achieve this?

Thanks,

Adam


modifying the codeigniter route structure - El Forum - 06-27-2008

[eluser]Randy Casburn[/eluser]
Hi Adam,

The only tricky part here is the customer_name.domain.com part of the equation. In case you're unaware, that requires you to have your hosting company, or you if you control your own server change your DNS {a} record for your server. Your ISP likely calls this a Sub domain of your primary and may actually charge you money to have "sub domains" on your account. Most don't. Once you get the customer_name.domain.com sub domain set up, the CI URI routing shouldn't be that difficult.

Randy


modifying the codeigniter route structure - El Forum - 06-27-2008

[eluser]adamBouchard[/eluser]
Thanks Randy,

I just set up wildcard subdomians via the httpd.conf file like so

<VirtualHost IP_ADDRESS HERE>
DocumentRoot /www/folder
ServerName www.domain.com
ServerAlias *.domain.com
</VirtualHost>

article is here if anyone wants to reference it http://steinsoft.net/index.php?site=programming/articles/apachewildcarddomain

now I need to figure out the best way to map the urls

thanks,

Adam