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

im getting 404 error when i hosted to server

i checked capital letter at starting.

Please some one help me.
Reply
#2

Did you change your base url in the config.php file to point to your domain?
What did you Try? What did you Get? What did you Expect?

Joined CodeIgniter Community 2009.  ( Skype: insitfx )
Reply
#3

(05-31-2019, 03:18 AM)InsiteFX Wrote: Did you change your base url in the config.php file to point to your domain?

yes i did
Reply
#4

(This post was last modified: 05-31-2019, 04:58 AM by dave friend.)

Are you trying to use any special routes?

Please show us the code for the controller and view of one such page.
Reply
#5

           
(05-31-2019, 04:57 AM)dave friend Wrote: Are you trying to use any special routes?

Please show us the code for the controller and view of one such page.

index is working but login is showing 404 error
Reply
#6

(This post was last modified: 05-31-2019, 08:03 AM by dave friend.)

(05-31-2019, 05:39 AM)chinna Wrote:
(05-31-2019, 04:57 AM)dave friend Wrote: Are you trying to use any special routes?

Please show us the code for the controller and view of one such page.

index is working but login is showing 404 error

In the welcome() function the last line is

PHP Code:
$this->load->view('loginn"); 

Should "loginn" be "login"? If it should be "login" that may be the source of the 404.

In the future please copy and paste all code into the message editor, then use the PHP button in the toolbar to make it as PHP code. It's less work for everybody in the long run. Thanks.
Reply
#7

If the .htaccess file you show is in the website's public folder then you should delete the following code

Code:
<IfModule authz_core_module>
    Require all denied
</IfModule>
<IfModule !authz_core_module>
   Deny from all
</IfModule>

You don't want to deny access to the web server, do you?
Reply
#8

(05-31-2019, 08:03 AM)dave friend Wrote:
(05-31-2019, 05:39 AM)chinna Wrote:
(05-31-2019, 04:57 AM)dave friend Wrote: Are you trying to use any special routes?

Please show us the code for the controller and view of one such page.

index is working but login is showing 404 error

In the welcome() function the last line is

PHP Code:
$this->load->view('loginn"); 

Should "loginn" be "login"? If it should be "login" that may be the source of the 404.

In the future please copy and paste all code into the message editor, then use the PHP button in the toolbar to make it as PHP code. It's less work for everybody in the long run. Thanks.
no bro its correct
Reply
#9

(05-31-2019, 08:18 AM)dave friend Wrote: If the .htaccess file you show is in the website's public folder then you should delete the following code

Code:
<IfModule authz_core_module>
   Require all denied
</IfModule>
<IfModule !authz_core_module>
  Deny from all
</IfModule>

You don't want to deny access to the web server, do you?

deleted still not working
Reply
#10

(05-31-2019, 05:39 AM)chinna Wrote:
(05-31-2019, 04:57 AM)dave friend Wrote: Are you trying to use any special routes?

Please show us the code for the controller and view of one such page.

index is working but login is showing 404 error

First fix the password code... .

https://paragonie.com/blog/2017/12/2018-...-passwords

Second: https://www.codeigniter.com/user_guide/i...ation-rule

Third: Update the php version 5.5 is very old


Back to the problem:
Check if the .htaccess is allowed
Reply




Theme © iAndrew 2016 - Forum software by © MyBB