I'm moving on a project that is in CodeIgniter.
There is a controller called system.php
which is to access admin
, but when I try to access it localhost/meusite/system/método
, it gives access denied because it thinks I'm trying to access the system folder of CodeIgniter, but if I put so localhost/meusite/index.php/system/método
it accesses normal.
What I did not understand is that the site that is on the air, is working normal without index.php
and here it does not leave.
I went up to the test server, and also did not.
It is only giving problem in this controller because of the same name system
, the rest is working normal.
How can I access without having to put index.php
and without giving the error that I am trying to access the system
folder?
Follow my .htaccess
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_URI} ^system.*
RewriteRule ^(.*)$ /index.php?/$1 [L]
RewriteCond %{REQUEST_URI} ^application.*
RewriteRule ^(.*)$ /index.php?/$1 [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?/$1 [L]
</IfModule>
<IfModule !mod_rewrite.c>
ErrorDocument 404 /index.php
</IfModule>