Welcome Guest, Not a member yet? Register   Sign In
Is it possible to give users their own subdomains in CodeIgniter?
#1

[eluser]KeyStroke[/eluser]
Hi,

I'm creating a site where users get to make their own profile. What I want to do is that each user gets a virutal sub domain, and then perhaps 'mod_rewrite' would send requests based on the sub domain a visitors enters.

For example:
Quote:http://username.example.com/friends

Would send the following HTTP request (while retaining the previous URL):
Quote:http://example.com/users/username/friends

is this possible in CI?


Your help is much apprecaited
#2

[eluser]Michael Wales[/eluser]
There are a variety of ways to accomplish this - fatigue just posted an .htaccess solution.

It might require a bit of work from your web host, to add a wildcard to map all subdomains (not just www) to the domain.
#3

[eluser]KeyStroke[/eluser]
Thanks mate. I missed it when I was searching here for a solution.

But I can add more variables in mod_rewrite, right? since my routing rearranges segments differently.

And what work would it require from my host? isn't it just replacing the '.htacces' file?




Theme © iAndrew 2016 - Forum software by © MyBB