Centos 6 - Codeigniter - HMVC - Not Found

Asked

Viewed 119 times

2

Good afternoon

I am developing a system with Codeigniter 2.X, and I use the concept of HMVC.

My files are like this:

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

My . htaccess is 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 accessing the home page (e.g..:http://exemplo.com.br/product), codeigniter works normally.

However, when accessing the system page (eg.:http://exemplo.com.br/sistema/login), codeigniter does not work. It shows the following error:

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

However, on my PC (windows 7 and xampp) it works fine, but when I move to my server (Centos 6 X86_64) it presents the error already mentioned.

I have not configured virtual host.

Thanks in advance.

Thank you.

2 answers

0

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

  • I have set up httpd file, to accept read file . htaccess;

  • And I created the . htaccess file directly on linux;

I appreciate all your help... Thank you

0

Try modifying your htaccess:

RewriteEngine on
RewriteCond $1 !^(index\.php|css|js|images|robots.txt|includes|relatorio)
RewriteRule ^(.*)$ index.php/$1 [L]
  • Hello friend, first, thanks for the help! But unfortunately it didn’t work, still gives the same error. Is it some virtual host configuration?

  • Or it has something to do with the permission of the files or the . htaccess?

Browser other questions tagged

You are not signed in. Login or sign up in order to post.