CodeIgniter Forums
Codeigniter and Wordpress in same root directory. Problems with index.php - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forum-5.html)
+--- Forum: General Help (https://forum.codeigniter.com/forum-24.html)
+--- Thread: Codeigniter and Wordpress in same root directory. Problems with index.php (/thread-75251.html)



Codeigniter and Wordpress in same root directory. Problems with index.php - teso86 - 01-17-2020

Hi,

My name is Martin Contreras, I have a similar problem.

My structure in Amazon linux ami is

var/www/html/
 
    web  ---> main web in wordpress
    demo ---> ci application
    caz  ---> another web in wordpress
    index.php --> redirect to web 

My problem is codeigniter is not working without index.php although $config['base_url'] = '' and my .htaccess in demo folder is like this:

<IfModule mod_rewrite.c>
  RewriteEngine On
  RewriteBase /demo/
  RewriteRule ^index\.php$ - [L]
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteRule . /demo/index.php [L]
</IfModule>

wordpress web htaccess

<IfModule mod_rewrite.c>
  RewriteEngine On
  RewriteBase /web/
  RewriteRule ^index\.php$ - [L]
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteRule . /web/index.php [L]
</IfModule>

Web works well but codeigniter demo project dont working

Not Found

The requested URL was not found on this server.

Only works if I put index.php

Thanks in advance

Martin Sad