0
votes

I had a project in codeigniter setup on localhost. And today I put the same project on server. On localhost it was working fine but after moving it to online server, it is not working and giving only "404 Page not found" error.

To resolve it, I changed the $config['base_url'] and the .htaccess file I'm using is below:

## Can be commented out if causes errors, see notes above.
Options +FollowSymLinks
Options -Indexes
## Mod_rewrite in use.

RewriteEngine On
RewriteCond %{QUERY_STRING} base64_encode[^(]*\([^)]*\) [OR]
RewriteCond %{QUERY_STRING} (<|%3C)([^s]*s)+cript.*(>|%3E) [NC,OR]
RewriteCond %{QUERY_STRING} GLOBALS(=|\[|\%[0-9A-Z]{0,2}) [OR]
RewriteCond %{QUERY_STRING} _REQUEST(=|\[|\%[0-9A-Z]{0,2})
RewriteRule .* index.php [F]
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
RewriteCond %{REQUEST_URI} !^/index\.php
RewriteCond %{REQUEST_URI} /component/|(/[^.]*|\.(php|html?|feed|pdf|vcf|raw))$ [NC]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule .* index.php [L]

Please let me know how can I resolve this issue?

1

1 Answers

0
votes

I may not sure but check your controller name and model names... dose they start with capital later ... i mean ... at server it effect ... if you have controller with name ... xyz_controller.php .. chage it to Xyz_controller.php .. same for models .. do that .. and same with class name ... it need to star with capital later ...