Welcome Guest, Not a member yet? Register   Sign In
controller issue
#1

[eluser]Arun Joshi[/eluser]
I have a controller for home.
through this I can access my site as www.mysite.com

And my problem is, I have many pages (about 50). I need my url as
www.mysite.com/a , www.mysite.com/b , www.mysite.com/c etc. Now I forced to create separate controllers for each pages.

Can I create this site architecture through one controller( here home controller)???
#2

[eluser]WanWizard[/eluser]
No, you can handle this using routes:
Code:
$route['([a-z])'] = "home/$1";
This routes all requests for www.mysite.com/a to www.mysite.com/z to your home controller. If you then use the _remap() method in your controller, you can then process the method request (your letter).
#3

[eluser]Arun Joshi[/eluser]
Thank u WanWizard....

I hadnt read the uri routing guide properly... ;-)




Theme © iAndrew 2016 - Forum software by © MyBB