Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CSS not loaded when more than one '/' in the path #206

Closed
aetrnm opened this issue Mar 1, 2022 · 1 comment
Closed

CSS not loaded when more than one '/' in the path #206

aetrnm opened this issue Mar 1, 2022 · 1 comment
Labels

Comments

@aetrnm
Copy link

aetrnm commented Mar 1, 2022

I have a 404 page route (code below). It works perfectly well with my 404.hbs file, css loads as well when I access localhost:3000/nonexistingpath

app.get("*", (req, res) => {
  res.render("404", {
    heading: "404",
    errorMessage: "Page not found",
    author: "me",
  });
});

However, css doesn't get loaded when I try to access localhost:3000/non/existing/path

@dougwilson
Copy link
Contributor

Hello, and sorry you are having that issue. It is unfortunately not related to this module, as it is just basic HTML. You need ti use an absolute path to your CSS in your HTML for your use case to work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants