Welcome Guest, Not a member yet? Register   Sign In
Default routing setup
#1

I installed Codeigniter for the first time, read documentation.
According to docs, the URI consists of set of segments:
PHP Code:
http://example.com/index.php/[controller-class]/[controller-method]/[arguments] 
But that scheme doesn't work for me out of the box. I've created blank controller application/controllers/Blog.php, and tested url 
PHP Code:
http://example.com/index.php/blog 
The result was Error 404.
Here is the code of the controller:
PHP Code:
<?php
class Blog extends CI_Controller {

 
       public function index()
 
       {
 
               echo 'Hello World!';
 
       }

base_url at application/config/config.php is set correctly to the server name.
So the problem is, that default controller at
PHP Code:
http://example.com/
and
http://example.com/index.php 

works, but everything else doesn't respond.
Reply


Messages In This Thread
Default routing setup - by Tiny - 01-06-2019, 12:28 PM
RE: Default routing setup - by jaweb - 01-07-2019, 02:08 AM
RE: Default routing setup - by Tiny - 01-07-2019, 03:15 AM
RE: Default routing setup - by jaweb - 01-07-2019, 01:07 PM
RE: Default routing setup - by MAILITY - 05-21-2019, 06:11 PM
RE: Default routing setup - by MAILITY - 05-21-2019, 06:12 PM
RE: Default routing setup - by php_rocs - 01-07-2019, 06:00 PM
RE: Default routing setup - by Les Kaye - 02-21-2019, 12:55 AM
RE: Default routing setup - by Soon - 04-13-2019, 03:28 AM
RE: Default routing setup - by InsiteFX - 02-22-2019, 04:09 AM
RE: Default routing setup - by dave friend - 05-23-2019, 11:09 AM
RE: Default routing setup - by InsiteFX - 05-22-2019, 03:01 AM
RE: Default routing setup - by dave friend - 05-23-2019, 11:05 AM
RE: Default routing setup - by InsiteFX - 05-23-2019, 12:20 PM



Theme © iAndrew 2016 - Forum software by © MyBB