It shows error

Please am new here, my hosted account at camangles.42.web.io when i put it on the server it shows error 404 page not found. Please what could be the issue

Hi and welcome to the forum

The correct address is this (no extra dot) camangles.42web.io

Did you accidentally delete the htdocs folder?
or you don’t have an index file?

7 Likes

The files of your website to into the htdocs directory of your account, not the root account. If you delete the htdocs directory, your website will only show 404 error pages.

Please delete all the files and directories you created in the root folder, create a new folder with the name htdocs, and upload your website files to it.

7 Likes

Please i have been able to delete my files and create them inside htdocs… The website now opens without the 404 error but shows directory listing of all the files instead of the website itself

Thank you, having a directory listing of my files
now instead of the website

Now upload (or move) your websites files into that folder.

3 Likes

They are all in the htdocs folder when i launch the website it shows like in the picture, directory listing with all the files in the htdocs

You are missing your index page. Make sure all the files are uploaded.

If home.php is what is supposed to show when the site is loaded, you will need to rename it to index.php

8 Likes

I did so, but it shows a blank white page.
Please what do should i do thanks

Everywhere in your menu there is old code that leads to home.php

and since you renamed home.php to index.php, that file cannot be found

Screenshot 2023-03-03 115525

FIX

Create a .htaccess file inside the htdocs folder

if you already have it
put this code at the beginning (open/edit with file manager - monstaFTP)

#Start here
DirectoryIndex home.php

so you tell the server what to serve as the starting file (when, for example, someone visits only the domain
http://camangles.42web.io/)

Note - also delete the existing code (line) if it exists and starts with DirectoryIndex xy xy xy

then

rename index.php to home.php



Then

Clear the browser cache by pressing a few times Ctrl + F5 while viewing your website.
If that doesn’t help (because some browsers are stubborn) then follow these instructions

https://tinkertechlab.com/webhosting/security/how-to-clear-your-browsers-cache

8 Likes

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