Welcome Guest, Not a member yet? Register   Sign In
Nothing in the tutorial of codeingniter for htaccess works for me. can anyone give me a hand?

I am getting frustrated trying to figure out the issue of htaccess. I tried all the tutorial from codeingiter nothing is work.
I am running apache2 in ubuntu 10.04. the rewrite mode is already enabled.

Here is the url that I test.

———Fail to work———-

error that I get is error 404 page not found
the default error 404 from browser not from codeigniter

Greatly appreciate your help.

And just to confirm, you have a controller (within the application/controllers folder) named "blog" with a functions named "index" and "comment"?

What is currently in your .htaccess file?


1. Try setting up a hostname in your /etc/hosts file in Ubuntu. I don't know your level of experience with Ubuntu/Linux so if you don't know, open it with the following in terminal: sudo nano /etc/hosts. Then restart your networking with the following in terminal: sudo /etc/init.d/networking restart (think that was it on Ubuntu to restart networking).

2. Make sure you've setup the appropriate hostname in your config.php file. It's one of the first things you're told to do in the Installation Instructions: http://ellislab.com/codeigniter/user-gui...index.html

Falkencreative, he already listed what controllers worked just needed to remove index.php.

[quote author="2think" date="1275801263"]Falkencreative, he already listed what controllers worked just needed to remove index.php.[/quote]
Sorry, read the original post a bit too fast. Ignore my comments then.


No problems, I think we all have our moments where we speed read through a post.

If he hadn't listed those URLs, it probably would have been one of the first things to check.

Thanks for quick replying guys.

basically I did follow what ever is in this web

At the moment this is what I have in my htaccess file

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /

RewriteCond %{REQUEST_URI} ^system.*
RewriteRule ^(.*)$ /index.php?/$1 [L]

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?/$1 [L]
<IfModule !mod_rewrite.c>
ErrorDocument 404 /index.php

Can you try this one and see if it works for you?

RewriteEngine on
RewriteBase /
RewriteCond $1 !^(index\.php|user_guide)
RewriteRule ^(.*)$ index.php/$1 [L]

Theme © iAndrew 2016 - Forum software by © MyBB