CodeIgniter 3 and CGI/FastCGI - SOLVED

I developed an application with CodeIgniter 3 which runs well on my local machine using Apache (XAMPP) which I’ve been testing on a live server in my own hosting account. It also runs well here - the server API is CGI/FastCGI.

So I moved the application to its production server with a different hosting company, also with the server API CGI/FastCGI. On this server, the landing page works fine (a login script) but once I log in I get a 404 page not found error (not my own, but the hosting provider’s 404 page).

I’ve tried all the possible solutions I can find with no luck. I think it has to do with mod_rewrite but I have no idea where to go from here. What might be causing this problem? I’ve read that mod_rewrite does not work with CGI/FastCGI, but it does work on my test application, just not on my production one.

2 Likes

I can’t edit my original post, so I’ll add a post - PROBLEM SOLVED!

SOLUTION:
Even though the application worked fine in my test server in a subdirectory, in the production server putting the application in a subdirectory was causing all the problems. I made several changes to my .htaccess file, but the one I think did the trick was to add RewriteBase /CRM/ where CRM is the name of my subdirectory.

3 Likes

@WebMachine Thanks for your reply, in my own case i don’t have any subdirectory and thats why i have RewriteBase / . I have also tried creating subdirectory but yet its not working, still getting the same 404 Page Not Found
The page you requested was not found.

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.