Welcome Guest, Not a member yet? Register   Sign In
Default Controller not loading after rerouting
#1

[eluser]Gewa[/eluser]
I have a codeigniter install where I have such routing \
Code:
$route['sites/([^/]+)/(.*)'] = '$2';
$route['default_controller'] = "content";

By idea when I go to

www.site.com/sites/sitename/

then the base_url=http://site.com/sites/sitename/ and I want that then default page that would be loaded is what I see when i go to

www.site.com/sites/sitename/content/

But I get just 404

What to do?
#2

[eluser]mddd[/eluser]
Routes do not work after each other like .htaccess rules do. The system looks for the first matching route, and executes it. That's it.
If you want to call /content, you should put that in your first route.

Or, if you need to just remove /sites/sitename from every url, make it a .htaccess rewrite rule and let CodeIgniter rules take over after that.




Theme © iAndrew 2016 - Forum software by © MyBB