codeigniter in ubuntu always shows "404 not found" -


welcome page shows. if create new controller , view means shows '404 not found' .

controller - create.php

<?php defined('basepath') or exit('no direct script access allowed'); class create extends ci_controller {     public function index()     {        $this->load->view('create');     } } 

view - create.php

<?php  defined('basepath') or exit('no direct script access allowed');?>   <!doctype html>  <html lang="en">  <body>        <h1>welcome codeigniter!</h1>  </body>  </html> 

i have run in browser - "http://example.com/create/". shows 404 not found. gave permission files also.

firstly showing welcome page because default controller welcome in application\config\routes.php file

$route['default_controller'] = "welcome";

only default controller can use without index.php.

so try other controllers "http://example.com/index.php/controllername/functionname"

you can refer : https://ellislab.com/codeigniter/user-guide/general/urls.html


Comments

Popular posts from this blog

Payment information shows nothing in one page checkout page magento -

tcpdump - How to check if server received packet (acknowledged) -