Reputation: 2703
I just hosted my website and am having some difficulties. i used the codeigniter frame work. The issue is this, when I try loading my site, it loads the index page well alright but the minute I try to browse to other pages it comes up with this error,
Not Found
The requested URL /home was not found on this server.
Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.
my htaccess file was wrong, this is the right configuration. hope this helps anyone that gets in the same mess. thanks to all who gave their time. :-)
RewriteEngine on RewriteCond $1 !^(index.php|(.*).swf|user_guide|profiles|images|min|assets|robots.txt) RewriteRule ^(.*)$ index.php/$1 [L]
Upvotes: 0
Views: 148
Reputation: 1973
More often than not, CodeIgniter doesn't detect the uri_protocol
properly. That results in the index page loading, but other pages 404ing. Check your uri_protocol
in config.php. I've had most luck with setting it to PATH_INFO
instead of AUTO
.
On most shared shared hosts, mod_rewrite
is enabled by default. Check phpinfo(). Also, your .htaccess
file should looks like this:
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [NC,L,QSA]
Upvotes: 0
Reputation: 1977
if you're using apache, you must install and configure mod_rewrite module.
Upvotes: 2