Welcome Guest, Not a member yet? Register   Sign In
having trouble with controllers

i have checked config.php and found the settings to match as you have stated,

I have put .htaccess files in both the application directory and the home directory, because I am unsure where it should be placed. Should it be the code you provided alone?

I have posted simply the information you have supplied within the .htaccess file and have attempted urls such as www.cashforbtc.com/pages/home, which yields "not found" pages.

however, www.cashforbtc.com/index.php/home , and other corresponding pages still work.

pages.php controller:

<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

class Pages extends CI_Controller {

public function index()

public function view($page = 'home')

// show an error ir the page doesnt exist for some reason  
if ( ! file_exists('application/views/pages/'.$page.'.php'))
  // Whoops, we don't have a page for that!
//Capitalize the first letter of the title
$data['title'] = ucfirst($page);

// load all the helpers and libraries to be used  

$config['base_url'] = 'http://www.cashforbtc.com/index.php/feedback';
$config['total_rows'] = 300;
$config['per_page'] = 3;

// load all the sections of the page

$this->load->view('templates/header', $data);
$this->load->view('templates/navbar', $data);
$this->load->view('pages/'.$page, $data);
$this->load->view('templates/footer', $data);




here are my current routes, or attempt to try what has been suggested, thus far the only
way im navigating to pages such as www.cashforbtc.com/index.php/home , pages/home does not work with combinations that have been suggested, or as i have miss?understood them.

//$route['pages/pmsystem/(:any)'] = 'pages/pm/$1';
// i disabled the above just to see if it was affecting below
$route['pages/pmsystem'] = '/pages/pmsystem.php';
// pages/pmsystem yeilds not found
$route['(:any)'] = 'pages/view/$1';
// when i use the route below, rather than the route above,
// index.php/login loads blank pages, and pages/login loads
// not found
//$route['page/:any'] = 'pages/view/$1
$route['default_controller'] = 'pages/view';
/* End of file routes.php */
/* Location: ./application/config/routes.php */

here is also a pastebin to my config.php file http://pastebin.com/EuHevUKQ

Theme © iAndrew 2016 - Forum software by © MyBB