Removing the index.php file - 11.09.2018 |
Hello guys!
i did all the settings described hier! First i created the .htaccess following this article https://github.com/bcit-ci/CodeIgniter/w...or-Windows Second config.php $config['base_url'] = 'http://localhost:50111/ci/'; $config['index_page'] = ''; routes.php $route['(:any)'] = 'pages/view/$1'; $route['default_controller'] = 'pages/view'; Class Pages.php class Pages extends CI_Controller { public function view($page = 'home') // First METHODE view { if ( ! file_exists(APPPATH.'views/pages/'.$page.'.php')) { // Whoops, we don't have a page for that! show_404(); } $data['title'] = ucfirst($page); // Capitalize the first letter $this->load->view('templates/header', $data); $this->load->view('pages/'.$page, $data); $this->load->view('templates/footer', $data); } The result that i got is this: http://localhost:50111/ci/index.php/news http://localhost:50111/ci/index.php/pages/view If i remove the index.php i got a error page. I restarted the server a couple of times and nothing happens. Does someone has a suggestion please? Thank you in advance! |
Messages In This Thread |
Removing the index.php file - 11.09.2018 - by Porto - 09-11-2018, 07:01 AM
RE: Removing the index.php file - 11.09.2018 - by php_rocs - 09-11-2018, 01:38 PM
RE: Removing the index.php file - 11.09.2018 - by Porto - 09-14-2018, 12:29 AM
RE: Removing the index.php file - 11.09.2018 - by Porto - 09-14-2018, 01:11 AM
RE: Removing the index.php file - 11.09.2018 - by ecampait - 09-11-2018, 02:47 PM
RE: Removing the index.php file - 11.09.2018 - by Porto - 09-14-2018, 12:33 AM
RE: Removing the index.php file - 11.09.2018 - by InsiteFX - 09-14-2018, 08:55 AM
RE: Removing the index.php file - 11.09.2018 - by Porto - 09-14-2018, 11:16 AM
RE: Removing the index.php file - 11.09.2018 - by InsiteFX - 09-14-2018, 12:14 PM
RE: Removing the index.php file - 11.09.2018 - by Porto - 09-24-2018, 06:05 AM
|