ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Routes in CodeIgniter application displays page not found

October 02, 2014 5:12pm

Subscribe [1]
  • #1 / Oct 02, 2014 5:12pm

    migswd

    1 posts

    I got a CI application with routes defined. 
    The main URL works fine but the subpages are not redirected. 
    When I enter the URL :
     
      http://xtrack.local/news/1393/litany-look

    I got error PAGE NOT FOUND and looks like it cannot find the base_url:

      Not Found
      The requested URL /news/1393/litany-look was not found on this server.

    Here is my routes file in application/config/routes.php :

      $route[‘news/(:any)’]    = ‘home/news/$1’;

    And my config file define my base_url :

      switch (ENVIRONMENT)
        {
    case 'development':
    $config['base_url'] = 'http://xtrack.local';
    break;

    default:
    exit('The application environment is not set correctly.');
    }

    EDIT1 :
    I found a way to access my news page through the index.php page:

      http://xtrack.local/index.php/news/1393/litany-look

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases