Can't load scripts, images, a stylesheet, and favicon

Question:
Trying to images, a stylesheet, and a favicon but they’re giving 404 error

Screenshots:
404

favicon not loading

Repl link:
https://replit.com/@RotoBit-Studios/RotoBit-Studios

Code snippets:

<link href="../static/css/style.css" rel="stylesheet" type="text/css">
<link href="../staiic/imgs/RotoBit-Studios.png" rel="icon" type="image/x-icon">
<img class="align-middle" src="../static/imgs/RotoBit-Studios.png">
<img src="../static/imgs/RotoBit-Studios.png" width="250" height="250">
<script type="text/javascript" src="../static/js/script.js"></script>

(the script doesn’t actually have any code but it’s still not loading)

1 Like

https://rotobit-studios.repl.co/static/css/style.css seems to work… forum isn’t in the path. I don’t know python, but hopefully that helps find the issue.

4 Likes

hmm looks to me like it’s getting from the current route /forum and appended /static try using the root (and add me as admin >:()

3 Likes

why are you on your alt? and wdym by root? like what Pika said?

3 Likes

Welcome to the community, @smallmaxworker!
lololololol

2 Likes

You do realize that is bigminiboss, right? lol

3 Likes
  1. testing something that needs alt
  2. root as in just the root url like URL/static since it seems that being on /forum will append all gets/posts to that url instead of root
4 Likes

@PikachuB2005’s solution works, but an alternative method I found is to add another ../ infront of the URL. So my stylesheet would be:

"../../static/css/style.css"

1 Like

It is still probably best to still use /static, instead of ../, because the static url is never going to change.

:thinking: :confused: confused reaction

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