We have two hosting packages at godaddy. Our live website is working fine using following .htaccess file. Website is accessible without using index.php in url.
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?/$1 [L]
We used same htaccess file and same code on other hosting that is also by godaddy. We just wanted to make production and development instances seperate. But on other hosting with same code and htaccess file, website shows 404 page not found error but website works fine with index.php in url.
We have same php version on both server. Just wants to know what could be the issue?
.htaccesslooks fine. The 404 often happens when file naming conventions for CI controller (and models) is not followed. Particularly acute with CI version => 3. You can be fooled if your development machine is a WAMP (on window) stack and you have apache on the live server. They handle character case differently. Also make sure that base_url is set correctly in config.php - DFriendexample.com/index.php/your_contoller? If the page is found then the problem is.htacccess. Otherwise, it is probably what I mentioned in the previous comment. - DFriend