404 error from codeigniter when hosted to server (tried every possible conditions) |
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. (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
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.
(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
Yes. You can find the same topic on Codeigniter official website https://www.codeigniter.com/user_guide/g.../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 ? (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/g.../urls.html bro its not working showing 404 error from server
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/2486...er-project I'm trying my best on mobile. Hope it helps. (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] |
Welcome Guest, Not a member yet? Register Sign In |