Error with controller in codeigniter with the name system.php

0

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>  
    
asked by anonymous 21.05.2014 / 20:21

1 answer

0

Put the CodeIgniter system files and folders out of the public folder (document root)

Example

website/public/
website/public/css
website/public/js
website/codeigniter/[COLOQUE AQUI, POR EXEMPLO]

After that, set the path of the codeigniter in the index.php that is in the public folder, that is, in the root of the "DocumentRoot".

    
21.05.2014 / 21:34