Part of the EllisLab Network

Bug Report

default_controller and routing

Date: 03/18/2008 Severity: Minor
Status: Bogus Reporter: ahmetozkaya
Version: 1.6.1
Keywords: Libraries, Router Class

Description

CodeIgniter 1.6.1
Apache 2.2.8
PHP 5.2.5

http://localhost/netpro/ -> 404 Page Not Found
http://localhost/netpro/mainpage -> “working”

Code Sample

# .htaccess
---------------------------------------------------
<
IfModule mod_rewrite.c>
    
RewriteEngine On
    RewriteBase
/netpro/
    
    
RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond
%{REQUEST_FILENAME} !-d
    RewriteRule
^(.*)$ index.php/$1 [L]
</
IfModule>
---------------------------------------------------

# routes.php
---------------------------------------------------
...
$route['default_controller'] = "mainpage";
...
---------------------------------------------------

# config.php
---------------------------------------------------
...
$config['index_page'] = "";
...
---------------------------------------------------

Expected Result

Actual Result

Comment on Bug Report

Page 1 of 1 pages
Posted by: ahmetozkaya on 18 March 2008 3:22am
ahmetozkaya's avatar

sorry,

$config[’uri_protocol’] = “REQUEST_URI”;

solve my problem.

Posted by: Derek Allard on 18 March 2008 6:02am
Derek Allard's avatar

Glad you got it.

Name:

Email:

Location:

URL:

Remember my personal information

Notify me of follow-up comments?