Problem with constructor and URI |
[eluser]v1ctoria[/eluser]
Hi lads! I'm actually building a simple website with members and I wanted to display member's page by just calling www.mywebsite.com/member/membername My class member is actually working well, but I had put the code in the index function making page member accessible at www.mywebsite.com/member/index/membername, which is actually not really useful. So the classic things was to put my code in the constructor, but I get the error : Quote:404 Page Not Found This is my class Member : Code: <?php And to complete, this is my model function: Code: function show_member() You will find some echo into. All are perfectly working going with a url with /member or /member/segment and as I sad, all is working if I'm putting it in Index Thanks a lot for your help
[eluser]danmontgomery[/eluser]
http://ellislab.com/codeigniter/user-gui...uting.html Code: $route['member/(:any)'] = 'member/index/$1';
[eluser]v1ctoria[/eluser]
Awesome, Thanks a lot Noctrum! I totally missed that part, clearly not focusing on that but more on why it's not working in __consruct. Just to try to understand, is it possible to do what I was trying to do in the constructor? if yes, what was wrong?
[eluser]Unknown[/eluser]
Hi v1ctoria, Have you solve the problem ? if yes, please let me know solution. I am facing same problem .
[eluser]InsiteFX[/eluser]
Use _remap method Code: // ./application/config/routes.php |
Welcome Guest, Not a member yet? Register Sign In |