Reputation: 159
Why is my .htaccess file not working. My framework is CodeIgniter
Options -Indexes
Options +FollowSymLinks
RewriteEngine On
RewriteBase http://core01.0fees.net/exam/
#Removes access to the system folder by users.
#Additionally this will allow you to create a System.php controller,
RewriteCond %{REQUEST_URI} ^system.*
RewriteRule ^(.*)$ index.php?/$1 [L]
#When your application folder isn't in the system folder
RewriteCond %{REQUEST_URI} ^application.*
RewriteRule ^(.*)$ /index.php?/$1 [L]
#Checks to see if the user is attempting to access a valid file,
#such as an image or css document, if this isn't true it sends the
#request to index.php
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?/$1 [L]
# If we don't have mod_rewrite installed, all 404's
# can be sent to index.php, and everything works as normal.
# Submitted by: ElliotHaughin
ErrorDocument 404 /index.php
Upvotes: 0
Views: 169
Reputation: 53
if you're working on linux environment try to lowercase first letter of file (home/home.php) linux environment is case sensitive Home.php and home.php are not same thing in linux. your problem is most probably this
Upvotes: 0
Reputation: 1587
Try to change this line:
RewriteBase http://core01.0fees.net/exam/
To this:
RewriteBase /exam/
RewriteBase option use relative path from web root.
Upvotes: 1
Reputation: 9044
Try this i use it is working fine for me. asset is the name of my application folder you can change it to your own.
RewriteEngine on
RewriteCond $1 !^(index\.php|uploads|images|css|js|lib|img|bootstrap|favicon|robots\.txt)
RewriteRule ^(.*)$ /asset/index.php/$1 [L]
Upvotes: 0