Wrong 404 page?

Heya!

I have the following error.
If i type https://saturnbot.xyz/aedfsdaf i can see my 404 page but if i type https://saturnbot.xyz/aedfsdaf/ghgjkhgkujgjhgujk i can see some bugged 404 page. How can i charnge it so it shows always my 404 page and not this?!

image

Make sure that all of the assets that you link to use absolute paths. That would mean instead of having <script src="script.js"></script> you’d have <script src="/script.js"></script> and likewise for images, css, etc.

6 Likes


Do u mean this?

image

image

add a slash / to the beginning - like in my pictures


This is about the scope

when someone is inside a subdirectory
and your page instructs him that in that directory there is an assets folder
and in fact, it is one or 100 levels above, it is not displayed because it cannot find it

That’s why a slash is added at the beginning of the path
so it would start looking from the root (domain) for that folder/file

6 Likes

Now i feel so stupid qwq :smiling_face_with_tear: THANK YOU!

2 Likes

You are not stupid - because you looked at it all from the point of view of the website you created and then everything was fine,

but when you introduced error pages in all that
and then tried some URL that has two or three non-existent subfolders in it /.../.../
it is normal for such a thing to happen.

If you don’t mind, I removed “solution” from me and assigned it to @wackyblackie
because he was the first to say what the problem was… I just wrote more text :joy:

5 Likes

Okay :joy: Thank yall sooo much

3 Likes

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