CodeIgniter Forums
Cannot reach dir in root dir. - Printable Version

+- CodeIgniter Forums (
+-- Forum: Archived Discussions (
+--- Forum: Archived Development & Programming (
+--- Thread: Cannot reach dir in root dir. (/thread-59493.html)

Cannot reach dir in root dir. - El Forum - 10-11-2013


I am currently developing a website in Codeigniter 2.1.3, and to this point it's going really well.
However, today a really weird problem occured.

When I started this project, I put three directories in the root of the project. They're called 'js', 'css', and 'img'. And I can reach them by typing,, and

Today, I needed a folder called 'cache' aswell. So I created the folder in the root, and tried to reach it. And here's my weird issue: When I typed, I was redirected to, and this gave me the following response:

Quote:404 Page Not Found

The page you requested was not found.

So I thought to myself, maybe the problem is within the name 'cache'. So I tried to create a new folder called 'trololo', just for testing purpose. Again I was redirected to

I also tried to remove all my self-made routes in application/config/routes.php. This had no effect.

Has anyone had a similar problem? Any clue what it is about?

I can also say, I'm currently trying to get Carabiner to work with my project, so in production environment, Carabiner will merge and minimize my css and javascript files.

Thanks in advance!

Best regards,

Cannot reach dir in root dir. - El Forum - 10-11-2013

Are you using an htaccess? My guess is your are passing everything to index.php.

Try using this one:
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?/$1 [L]

which will pass requests to index.php, only if it ISN'T a REAL file/directory.

Cannot reach dir in root dir. - El Forum - 10-12-2013

Thanks a million, CroNiX! It works perfectly fine now! Smile
However, I really need to learn to write proper htaccess-files. Do you know any good tutorial website where I can learn?

// Johan