• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
New page can not be opened

#1
Hello everybody,
I have started a new project and also the new version of the Codeigniter.
When I create a new folder in the view and create a page in it, then call this.
Do I get the message Object not found !, Error 404.

Now I'm just wondering why?
The test page welcome.php works without problems



Controller:
PHP Code:
    defined('BASEPATH') OR exit('No direct script access allowed');
    class 
Welcome extends CI_Controller {
        function 
__construct() {
            
parent::__construct();
        }
        public function 
index() {
            
$data['title'] = 'Startseite';
            
$this->load->view('welcome_message'$data);
        }

    public function 
test()
    {
        
$this->load->view('test');
    }
    public function 
welcome_message()
    {
        
$this->load->view('pages/welcome_message');
    }


routes.php
PHP Code:
// $route['default_controller'] = 'pages/index';
$route['default_controller'] = 'welcome';
$route['404_override'] = '';
$route['translate_uri_dashes'] = FALSE;
$route['news/create'] = 'news/create';
$route['news/(:any)'] = 'news/view/$1';
$route['news'] = 'news';
$route['(:any)'] = 'pages/view/$1';
// $route['default_controller'] = 'pages/view'; 
Reply

#2
Hi,

What is the URL that gives your the 404 error?
A good decision is based on knowledge and not on numbers. - Plato

Reply

#3
.../verwaltung/haushaltsbuch/index
Reply

#4
It wouldn't surprise me if your route
PHP Code:
$route['(:any)'] = 'pages/view/$1'
translates this to:
…/pages/view/verwaltung/haushaltsbuch/index
Reply


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


Users browsing this thread:
1 Guest(s)


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2019 MyBB Group.