Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

net::ERR_ABORTED 403 for relative asset

A topic by mikeysee created Mar 30, 2021 Views: 380 Replies: 2
Viewing posts 1 to 2
(1 edit)

Hi,

I have read the issue and the FAQ about uploading HTML5 games (https://itch.io/docs/creators/html5) and am using relative links for assets but for some reason im still getting 403's any idea?

<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8" />
    <title>BattleTabs</title>
    <base href="/">
    ...  
    <link rel="stylesheet" type="text/css" href="./main.css" />
  </head>
  <body tabIndex="1">
    ...
    <script src="main.js" type="module"></script>
  </body>
</html>

Neither of those two relative paths, css or js, seem to work I get the same issue:


Admin(+1)

You aren’t using a relative path, you are using an absolute since you set base to /. On your servers, your game is placed in a subdirectory, if you use the absolute path / then you are leaving the subdirectory and are trying to access paths outside of where your game is located.

Check this guide here for some common issues people run into when uploading html5 games: https://itch.io/docs/creators/html5#common-pitfalls

Oh wow! Cant believe I didnt notice that and I even copied and pasted it lol! 

This topic has been auto-archived and can no longer be posted in because there haven't been any posts in a while.