How to fix CodeIgniter 3 & Cloudways File not found problem

If you run a CodeIgniter site on Cloudways hosting you may come across this problem. All the CodeIgniter sites on the server stop working and display the message: “File not found.” with a 404 response.

The problem is caused by Apache 2.4.10 updating to Apache 2.4.25 (PHP FPM and FastCGI).

The solution is to update the .htaccess file so that

RewriteRule ^(.*)$ /index.php/$1 [L]

becomes

RewriteRule ^(.*)$ /index.php?/$1 [L]

note the extra ? character after .php

3 Replies to “How to fix CodeIgniter 3 & Cloudways File not found problem”

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.