• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
modifying the codeigniter route structure

#1
[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

#2
[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

#3
[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=prog...carddomain

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

thanks,

Adam


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.