Subdomains as Userpages / Profilepages |
[eluser]Unknown[/eluser]
I'm searching for a way to make subdomains ussable for profilepages of users. Ofcourse I need a wildcard in my DNS and Apache config, which is already done and working. Because I want to keep this way of subdomains flexible, I don't want to use a .htaccess file so I need to do something with a route that recognizes the subdomain and does something magic. Something like this could work I think: $usernamehost = explode(’.', $_SERVER['HTTP_HOST'], 2); I have found a CI example that does explain it, but not in detail if you ask me. SO I'm confused how to use this. The blog itself also redirect to this forum, but still I can't find the right solution. http://andy.sinaptix.com/2007/08/22/user...deigniter/ Has anyone done this already ?
[eluser]bretticus[/eluser]
I read the post. It's actually pretty clear if you ask me (more so than I was expecting to be.) Maybe I can clear it up a little more: Code: //from those forum entry, I’ve made final modification to the config.php file : ...Means put that in your application/config/config.php file. ($config['base_url'] is already there. it needs to be modified per example above.) $config['user_base_url'] gives you the user name at all times. Either pass this config item (read config class in manual) from your controller to your model that gets user data or get it from within that model. |
Welcome Guest, Not a member yet? Register Sign In |