404 error from codeigniter when hosted to server (tried every possible conditions) - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5) +--- Forum: Installation & Setup (https://forum.codeigniter.com/forumdisplay.php?fid=9) +--- Thread: 404 error from codeigniter when hosted to server (tried every possible conditions) (/showthread.php?tid=73754) |
RE: 404 error from codeigniter when hosted to server (tried every possible conditions) - chinna - 06-02-2019 (06-02-2019, 03:33 AM)InsiteFX Wrote: It's redirecting right, look at your route. now what i have to do? RE: 404 error from codeigniter when hosted to server (tried every possible conditions) - demyr - 06-02-2019 Hi there. First, why not trying to remove index.php in your url? Open config.php and do following replaces: $config['index_page'] = "index.php" to : $config['index_page'] = "" Btw, your address is https://www.everstore.com.au/testcod/test/ I think you must first set up everything clearly. Choose your main Controller name. For example: Home. And a model: Home_Model. And insert your view just in your view folder. You can also create some sub folders for views like Backend or Site. And don't forget correct routing. RE: 404 error from codeigniter when hosted to server (tried every possible conditions) - chinna - 06-02-2019 (06-02-2019, 11:54 AM)demyr Wrote: Hi there.$config['index_page'] = "index.php" bro i removed index.php but still i need to use index.php https://www.csemrec.ml/lol/ this is my base url (new one as you told setup everything clear) in this i have reg and login https://www.csemrec.ml/lol/reg/ is not working https://www.csemrec.ml/lol/index.php/reg/ is working now how to solve index.php RE: 404 error from codeigniter when hosted to server (tried every possible conditions) - demyr - 06-02-2019 Now it's time to add htaccess file. Can you please look for it on internet? as I'm on mobile now, I cannot type here : "Codeigniter htaccess" . You will find 3-4 lines of code and it will solve your index.Php problem. RE: 404 error from codeigniter when hosted to server (tried every possible conditions) - chinna - 06-03-2019 (06-02-2019, 10:56 PM)demyr Wrote: Now it's time to add htaccess file. Can you please look for it on internet? as I'm on mobile now, I cannot type here : "Codeigniter htaccess" . You will find 3-4 lines of code and it will solve your index.Php problem. Code: RewriteEngine on RE: 404 error from codeigniter when hosted to server (tried every possible conditions) - demyr - 06-03-2019 Yes. You can find the same topic on Codeigniter official website https://www.codeigniter.com/user_guide/general/urls.html Upload it to your main directory. Btw, can you please write here your main url, the one you wish to publish your website under. Is it everstore.com.au or everstore.com.au/AnyFolder ? RE: 404 error from codeigniter when hosted to server (tried every possible conditions) - chinna - 06-03-2019 (06-03-2019, 01:39 AM)demyr Wrote: Yes. You can find the same topic on Codeigniter official website https://www.codeigniter.com/user_guide/general/urls.html bro its not working showing 404 error from server RE: 404 error from codeigniter when hosted to server (tried every possible conditions) - demyr - 06-03-2019 Let me write you an example from the scratch: 1- create a controller named Mysite Inside this Mysite file: public function index() { $this->load->view('index) ; // it shows your website-view- is not under a folder.. If under a folder then - >view(' Folder/viewfile') } If your public function name is not index, then be careful about routing. 2- Create your view. Either under a folder or not: directly in your view folder 3- arrange the route (you have learnt it) 4- some adjustments like config 5- upload your htaccess. Plus, this link might help : https://stackoverflow.com/questions/24865477/how-to-deploy-a-codeigniter-project I'm trying my best on mobile. Hope it helps. RE: 404 error from codeigniter when hosted to server (tried every possible conditions) - chinna - 06-03-2019 (06-03-2019, 02:17 AM)demyr Wrote: Let me write you an example from the scratch:bro im really thanks for your help but i did not get it. so please pm me i will give you my hosting user and pass, you set it and explain me please my email: [email protected] RE: 404 error from codeigniter when hosted to server (tried every possible conditions) - chinna - 06-04-2019 guys need help pls some one reply |