Welcome Guest, Not a member yet? Register   Sign In
Removing the main-controller's name from url
#2

(This post was last modified: 08-31-2015, 09:25 AM by JoelPiccoli.)

(08-31-2015, 07:16 AM)Liquid8 Wrote: Hi,

I have made a website which has almost all the operations under the same controller named "mainsite".
So my urls look like this: www.mydomain.com/mainsite/products or www.mydomain.com/mainsite/page/3 etc.
Is it possible to completely remove the "mainsite" -part from url with routes.php? Or with some other "trick" so that I wouldn't need to start moving everything from my mainsite-controller to other controllers?


You can use the routes like it should be. Something like this...


PHP Code:
$route['products'] = 'mainsite/products';
$route['page/(:num)'] = 'mainsite/page/3'
Reply


Messages In This Thread
RE: Removing the main-controller's name from url - by JoelPiccoli - 08-31-2015, 07:29 AM



Theme © iAndrew 2016 - Forum software by © MyBB