EllisLab text mark
Advanced Search
     
Get automatic 3rd domain level
Posted: 13 October 2009 09:17 AM   [ Ignore ]
Avatar
Joined: 2009-10-13
5 posts

Hi,
  I need to assign a third-level domain (like: http://user-name.mysite.com) for each user registered on my web-site at registration form.

Can codeigniter support this? What i have to do to make this automatic?

Can i not use .htaccess?

Thanks!

 
Posted: 13 October 2009 10:23 AM   [ Ignore ]   [ # 1 ]   [ Rating: 0 ]
Avatar
Joined: 2007-05-24
717 posts

Do a google on wildcard subdomains. This is not so much Codeigniter specific. Once you got the wildcards working, route them to you default controller

 Signature 

The art of managing is to explain tomorrow why yesterdays solution doesn’t work today.
livecodes.eu

 
Posted: 08 October 2012 01:36 PM   [ Ignore ]   [ # 2 ]   [ Rating: 0 ]
Joined: 2012-07-24
2 posts

yes you can do it.
need to do some changes in route files. Save your user-name in db and force user to enter username before domain name. and check it in route file. It is easiest method to achieve your goal

 
Posted: 08 October 2012 01:46 PM   [ Ignore ]   [ # 3 ]   [ Rating: 0 ]
Joined: 2011-02-23
882 posts
rogierb - 13 October 2009 10:23 AM

Do a google on wildcard subdomains. This is not so much Codeigniter specific. Once you got the wildcards working, route them to you default controller

@rogierb is right: It’s more an apache2/webserver issue than something specifically related to CI. You will need to set up widlcard subdomains which then will point to something like

http://www.example.com/users/profile/<user-name> 
 Signature 

ignited Community Framework (WiP)  |  Read the User’s Guide. It won’t bite.

STOP! Before posting your questions, remember the WWW Golden rule:
What did you try? What did you get? What did you expect to get?

CI example .htaccess