<domain name>/<username> |
[eluser]yazid[/eluser]
Hi everybody, For my website, i need to add the feature to open user own profile through writing the user name after the domain name, means for example if my name is "Yazid", and my domain name is www.domain-name.com, i would enter www.domain-name.com/yazid to access my profile, which has the url: www.domain-name.com/index.php/index/myshowroom/<my ID>, how to implement this please? By the way, what does this feature called? and is there any suggestions? Thanks in advance for your effort.
[eluser]Dennis Rasmussen[/eluser]
In your config/routes.php file add the following route: Code: $route['404_override'] = 'Controller/Method'; This will send all domain.com/<anything> urls to that controller and method. But then make sure that you don't have any profile names that match any controllers ![]()
[eluser]yazid[/eluser]
Oh, Thank you Dennis, this is very useful for me, i am really thankful for the quick reply also ![]() i tried it and it worked properly, but do you know what does this feature called?
[eluser]Dennis Rasmussen[/eluser]
I'm sorry, but I don't know the name of the feature ![]() I'm new to CodeIgniter myself.
[eluser]yazid[/eluser]
Thank you my friend, your answer was enough, but i don't know why it doesn't work any more, when i put any variable, it redirects me normally to the 404 error page, just as i didn't add the routing line! do you have any idea, what would be the reason? |
Welcome Guest, Not a member yet? Register Sign In |