• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Confusion - routing related

#1
[eluser]Unknown[/eluser]
Maybe I'm missing something simple, but I'm having a problem and was hoping someone could help.

A general description of the problem
I'm getting CodeIgniter's 404 error page no matter what

On closer inspection

My "logs" directory contains a file that says:

Quote:DEBUG - 2007-07-06 11:00:25 --> Config Class Initialized
DEBUG - 2007-07-06 11:00:25 --> Hooks Class Initialized
DEBUG - 2007-07-06 11:00:25 --> No URI present. Default controller set.
DEBUG - 2007-07-06 11:00:25 --> Router Class Initialized
DEBUG - 2007-07-06 11:00:25 --> Output Class Initialized
DEBUG - 2007-07-06 11:00:25 --> Input Class Initialized
DEBUG - 2007-07-06 11:00:25 --> Global POST and COOKIE data sanitized
DEBUG - 2007-07-06 11:00:25 --> URI Class Initialized
DEBUG - 2007-07-06 11:00:25 --> Language Class Initialized
ERROR - 2007-07-06 11:00:25 --> 404 Page Not Found -->

This happens whether I go to the default directory (mapping to index), to the default controller set up in routs or to any "directory" representing a valid controller or not.

The only non-standard things are that I have hooks (filters) enabled and my .htaccess file isn't as described in the documentation (I get a server config problem if I do it just as the docs say). It is set up:

Code:
Options FollowSymlinks
RewriteEngine on

RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php?$1 [L]

But for CI to be using the CI 404, it has to be working.

Any tips?

#2
[eluser]coolfactor[/eluser]
Does accessing the url with "index.php" intact work? Is it just when you try to remove index.php from the url that this happen?

I use the same approach that you do, but I also include the following condition to check existence of directories:
Code:
RewriteCond %{REQUEST_FILENAME} !-d

#3
[eluser]coolfactor[/eluser]
Here's a full RewriteRule from one of my sites (same on all of my sites):

Code:
<IfModule mod_rewrite.c>
    Options +FollowSymLinks
    RewriteEngine on
    RewriteBase /
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)$ index.php/$1 [QSA,L]
</IfModule>


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


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