Welcome Guest, Not a member yet? Register   Sign In
problem: index.php still exist in after modifying .htaccess

My .htaccess is

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

but the controller still returns http://www.example.com/index.php/welcome.html

.htaccess is located with application folder, system folder and ci main index.php

welcome controller is in application->controllers folder


Have you adjusted the following config line in the config.php document?

$config['index_page'] = '"";

The above should have index.php removed from the ""

i've $config['index_page'] = ''; but my controllers will not work without index.php at the url Sad


# Customized error messages.
ErrorDocument 404 /index.php

# Set the default handler.
DirectoryIndex index.php

# Various rewrite rules.
<IfModule mod_rewrite.c>
  RewriteEngine on
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteCond $1 !^(index\.php|css|js|images|files|scripts|robots\.txt)
  RewriteRule ^(.*)$ index.php/$1 [L,QSA]

controllers will still not work without index.php in url Sad

eyes are too tired got to sleep i'll be back, tnx

Are you sure your server supports the use of a .htaccess file ?
If its a windows IIS server or on some shared servers your host my not allow them wit out contacting them and directly asking to be allowed to use it.

Also, on OSX servers they are not enabled by default. You will need to edit your httpd.conf file.

Try changing this in your application/config/config.php file.
| This item determines which server global should be used to retrieve the
| URI string.  The default setting of "AUTO" works for most servers.
| If your links do not seem to work, try one of the other delicious flavors:
| 'AUTO'            Default - auto detects
| 'PATH_INFO'        Uses the PATH_INFO
| 'REQUEST_URI'        Uses the REQUEST_URI
$config['uri_protocol']    = "AUTO";
Test until you find one that works!


still no Sad

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

i know part of this code work since access to image directory is allowed including the index.php & robots.txt

try to change your .htaccess to

deny from all

and you don't get a 403 error, it means that the server is set not to allow .htaccess overrides - this needs to be changed in the server's configuration - look for the line
AllowOverride None
and change it to
AllowOverride All
, restart server and test again that you get a 403 error.

Theme © iAndrew 2016 - Forum software by © MyBB