Welcome Guest, Not a member yet? Register   Sign In
404 error from codeigniter when hosted to server (tried every possible conditions)
#21

(06-02-2019, 03:33 AM)InsiteFX Wrote: It's redirecting right, look at your route.

controller/method
welcome   /loginn

now what i have to do?
Reply
#22

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.
Reply
#23

(06-02-2019, 11:54 AM)demyr Wrote: 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.
$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
Reply
#24

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.
Reply
#25

(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
RewriteCond $1 !^(index\.php|resources|robots\.txt)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L,QSA]
this on???
Reply
#26

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  ?
Reply
#27

(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

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  ?

bro its not working

showing 404 error from server
Reply
#28

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.
Reply
#29

(06-03-2019, 02:17 AM)demyr Wrote: 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.
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]
Reply
#30

guys need help pls some one reply
Reply




Theme © iAndrew 2016 - Forum software by © MyBB