Codeigniter with WordPress routing

I needed to insert data from app database to the wordpress blog. So I came up with the following setup, where I used CodeIgniter as a theme to the WordPress.


Now if we call Forums then the Forums.php controller’s index function catches the call, but if we call Forums/forum/something then the Forums.php controller’s forum function does not catch the call.

This is all the routings I tried but nothing worked, every time whenever there is one or more levels to the uri the page lands up on error_404 page.

$route['(?i)Forums/forum/(:any)'] = 'Forums/forum/$1';
$route['(?i)forums/forum/(:any)'] = 'forums/forum/$1';
$route['(?i)forums/forum/(:any)/(:any)'] = 'forums/forum/$1';
$route['(?i)forums/forum/(:any)/(:any)/(:any)'] = 'forums/forum/$1';
$route['(?i)forums/forum/(:any)/(:any)/(:any)/(:any)'] = 'forums/forum/$1';

Read more here: Codeigniter with WordPress routing

Leave a Reply

Your email address will not be published. Required fields are marked *