Got 404 error when i open my website

Website URL

(please specify the URL of the site on which you are experiencing the problem)
http://buildmyrig.kesug.com/

Error Message

(please share the FULL error message you see, if applicable)

404 Page Not Found

The page you requested was not found.
and this is the log :
INFO - 2024-10-19 03:41:59 → Config Class Initialized

INFO - 2024-10-19 03:41:59 → Hooks Class Initialized

DEBUG - 2024-10-19 03:41:59 → UTF-8 Support Enabled

INFO - 2024-10-19 03:41:59 → Utf8 Class Initialized

INFO - 2024-10-19 03:41:59 → URI Class Initialized

INFO - 2024-10-19 03:41:59 → Router Class Initialized

INFO - 2024-10-19 03:41:59 → Output Class Initialized

INFO - 2024-10-19 03:41:59 → Security Class Initialized

DEBUG - 2024-10-19 03:41:59 → Global POST, GET and COOKIE data sanitized

INFO - 2024-10-19 03:41:59 → Input Class Initialized

INFO - 2024-10-19 03:41:59 → Language Class Initialized

ERROR - 2024-10-19 03:41:59 → 404 Page Not Found: /index

Other Information

(other information and details relevant to your question)
I’am not sure what wrong, i setup the .htacess file, update the routes, config and database but still got this error, previously i run thiss on my local xampp web service locally and it’s all work, can anybody help please

Please read

4 Likes

The error page looks like the standard CodeIgniter error page. Assuming you didn’t make any modifications you shouldn’t have, which page should be shown here should be determined by the routes and controllers in your CodeIgniter project.

The link @KangJL is mostly irrelevant because you’re not reaching the server’s “file not found” logic, but rather the “route/controller not found” logic in your application.

I’m not too familiar with CodeIgniter, but I found one possible explanation:

In your code, you appear to have the default route set to “dashboard”. You also have a class Dashboard in your controllers directory, but you seem to have made one mistake.

As CodeIgniter’s documentation says:

The file must be called ‘Blog.php’, with a capital ‘B’.

You called the file dashboard.php, but it should be called Dashboard.php.

On your own computer, this probably worked, because you were running on Windows or MacOS, which do not have case sensitive file names. But our servers, like almost all hosting servers, run on Linux, which does have case sensitive file names.

4 Likes

i tried to change the file name as you suggest, i got error al over the place mostly like this A PHP Error was encountered
Severity: 8192

Message: Creation of dynamic property Dashboard::$benchmark is deprecated

Filename: core/Controller.php

Line Number: 75

Backtrace:

File: /home/vol17_1/infinityfree.com/if0_37543022/htdocs/application/controllers/Dashboard.php
Line: 6
Function: __construct

File: /home/vol17_1/infinityfree.com/if0_37543022/htdocs/index.php
Line: 315
Function: require_once

That looks like a deprecation warning, not an error, so it shouldn’t prevent your site from working. Unless CodeIgniter’s error handling considers deprecation errors to be breaking issues of course, then it won’t work.

Still, the best solution long term is to check the error messages themselves and fix the errors proposed. In this case, it’s clear that some of your code is not recommended with PHP 8, and you should change it to prevent it from actually causing issues with future PHP versions.

3 Likes

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.