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
| Posted by: ahmetozkaya on 18 March 2008 3:22am | |
|
|
sorry, $config[’uri_protocol’] = “REQUEST_URI”; solve my problem. |
| Posted by: Derek Allard on 18 March 2008 6:02am | |
|
|
Glad you got it. |
