CentOS 6 - Codeigniter - HMVC - Not Found

2

Good afternoon

I'm developing a system with Codeigniter 2.X, and I use the HMVC concept.

My folders look like this:

->system/
.htaccess
->application/
   ->controllers
       ->...
   ->model
       ->...
   ->view
       ->...
   ->modules
       ->sistema
           ->controllers
               ->...
           ->model
               ->...
           ->view
               ->...

My .htaccess looks like this:

<IfModule mod_rewrite.c>
RewriteEngine on 
RewriteCond $1 !^(index.php|css|js|images|robots.txt|includes|relatorio) 
RewriteRule ^(.*)$ /codeigniter/index.php/$1 [L]
</IfModule>

Then, when you access the home page (eg link ), codeigniter works normally.

However, when accessing system pages (eg link ), codeigniter does not work. It has the following error:

Not Found
The requested URL /codeigniter/sistema/login was not found on this server.

However, in my PC (windows 7 and xampp) it works cool, but when I go to my server (CentOS 6 X86_64) it presents the error already mentioned.

I did not configure virtual host.

Thank you in advance.

Thank you.

    
asked by anonymous 14.11.2015 / 21:06

2 answers

0

Try to modify your htaccess:

RewriteEngine on
RewriteCond $1 !^(index\.php|css|js|images|robots.txt|includes|relatorio)
RewriteRule ^(.*)$ index.php/$1 [L]
    
15.11.2015 / 02:40
0

I managed to fix it. I'm not sure where the problem was, but my actions were as follows:

  • I configured the httpd file, to accept reading the .htaccess file;

  • And I created the direct .htaccess file in linux;

Thank you for all your help ... Thank you

    
21.11.2015 / 21:53