Welcome Guest, Not a member yet? Register   Sign In
Usernames as subdomains and a root website
#5

[eluser]whizzer[/eluser]
I guess I'm know explaining myself properly. I am redirecting all my subdomain requests (ex. test.site.com, username1.site.com, user.name.test.site.com) to my root website - site.com. There I have an CI installation. In a hook I validate whehter test, username1, user.name.test are registered users. If not or if site.com is accessed I want to show my main website. However, if there is a registered user "username1" I want to show his blog. Here's how I think it should work:
Controller "site" with method "index" for my main website. It will be set as a default controller, so accessing site.com will show my site.
Controller "blog" for my user's blogs. However here I have a problem. If the user accesses username1.site.com I will know (using my hook) that he is a valid user. But how will I load the contents of the blog without adding class and a method name. Ex: username1.site.com /blog/index will work, since in the blog controller I will know the username (username1) and I will be able to load the contents. But I don't want that /blog/ part of the url.
Any ideas?


Messages In This Thread
Usernames as subdomains and a root website - by El Forum - 07-24-2010, 02:53 PM
Usernames as subdomains and a root website - by El Forum - 07-24-2010, 07:27 PM
Usernames as subdomains and a root website - by El Forum - 07-28-2010, 05:29 AM
Usernames as subdomains and a root website - by El Forum - 07-28-2010, 05:43 AM
Usernames as subdomains and a root website - by El Forum - 07-28-2010, 08:14 AM
Usernames as subdomains and a root website - by El Forum - 07-28-2010, 09:03 AM
Usernames as subdomains and a root website - by El Forum - 07-28-2010, 09:19 AM
Usernames as subdomains and a root website - by El Forum - 07-28-2010, 09:55 AM
Usernames as subdomains and a root website - by El Forum - 07-28-2010, 12:16 PM
Usernames as subdomains and a root website - by El Forum - 07-28-2010, 12:29 PM
Usernames as subdomains and a root website - by El Forum - 07-29-2010, 03:23 AM
Usernames as subdomains and a root website - by El Forum - 08-11-2010, 05:54 AM



Theme © iAndrew 2016 - Forum software by © MyBB