CodeIgniter Forums
Move from localhost to live server error 404 - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5)
+--- Forum: General Help (https://forum.codeigniter.com/forumdisplay.php?fid=24)
+--- Thread: Move from localhost to live server error 404 (/showthread.php?tid=66195)



Move from localhost to live server error 404 - Winfina - 09-19-2016

I really suck in codeigniter and so I search for a solution for my problem.
I programmed a website which perfectly works on my localhost. Now I uplouded the project with filezille on a live server and get the 404 error.
Of course I changed the base url in my confiq.php:
Code:
$config['base_url'] = 'http://test.mypage.de/userid/';

But still get the error.
My .htaccess looks that way:

Code:
<IfModule mod_rewrite.c>

RewriteEngine On
RewriteBase /
#Removes access to the system folder by users.
#Additionally this will allow you to create a System.php controller,
#previously this would not have been possible.
#'system' can be replaced if you have renamed your system folder.
RewriteCond %{REQUEST_URI} ^system.*
RewriteRule ^(.*)$ /index.php?/$1 [L]

#When your application folder isn't in the system folder
#This snippet prevents user access to the application folder
#Submitted by: Fabdrol
#Rename 'application' to your applications folder name.
RewriteCond %{REQUEST_URI} ^application.*
RewriteRule ^(.*)$ /index.php?/$1 [L]

#Checks to
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?/$1 [L]    

</IfModule>

<IfModule !mod_rewrite.c>
   # If we don't have mod_rewrite installed, all 404's
   # can be sent to index.php, and everything works as normal.
   # Submitted by: ElliotHaughin

ErrorDocument 404 /index.php

</IfModule>


Does somebody see my fault? I already read everthing I coud find in the web to this problem, but most things I either don´t understand or it does not help me.
I hope someone here has a hint for me. Best regards guys, a desperate programmer girl.


RE: Move from localhost to live server error 404 - wolfgang1983 - 09-19-2016

Dis you follow the CI file and class name style

http://www.codeigniter.com/user_guide/general/styleguide.html#file-naming


RE: Move from localhost to live server error 404 - Aerondight - 09-20-2016

Read http://stackoverflow.com/questions/23546991/codeigniter-3-0-works-on-localhost-but-not-server before?


RE: Move from localhost to live server error 404 - Aerondight - 09-20-2016

Your live server under is Linux?

Your localhost is under Windows?

If so, the problem is most likely the capitalisation of names of controller and method.


RE: Move from localhost to live server error 404 - Winfina - 09-20-2016

(09-19-2016, 03:00 PM)wolfgang1983 Wrote: Dis you follow the CI file and class name style

http://www.codeigniter.com/user_guide/general/styleguide.html#file-naming
 yes, I changed the file names and wrote everywhere a capital letter (in the controller and in the model directory)


RE: Move from localhost to live server error 404 - Winfina - 09-20-2016

(09-20-2016, 02:13 AM)Aerondight Wrote: Read http://stackoverflow.com/questions/23546991/codeigniter-3-0-works-on-localhost-but-not-server before?

yes I did. I changed in the conroller, model and core directory the first letter to a capital letter but I still get the 404


RE: Move from localhost to live server error 404 - Winfina - 09-20-2016

(09-20-2016, 02:17 AM)Aerondight Wrote: Your live server under is Linux?

Your localhost is under Windows?

If so, the problem is most likely the capitalisation of names of controller and method.
Both right. But I change everywhere (controller, modells, core) to capital letter


RE: Move from localhost to live server error 404 - cartalot - 09-20-2016

Remove that htaccess file, update your application/config to use index.php , and see if it works with 'index.php' in the url address. if it does work then contact your hosting company to get help with configuring the htaccess file for your server.

If it does not work then do a 'sanity check'. Download a new copy of Codeigniter. Install it on your live web server with no htaccess. See if you can get the default welcome page. If you don't get the welcome page then something needs to be configured on the server. If you do get the welcome page then start adding routes, helpers, database, etc to try and isolate the issue.