Github pages loads index.html in subfolder and requests are made to root #131865
Replies: 1 comment
-
🕒 Discussion Activity Reminder 🕒 This Discussion has been labeled as dormant by an automated system for having no activity in the last 60 days. Please consider one the following actions: 1️⃣ Close as Out of Date: If the topic is no longer relevant, close the Discussion as 2️⃣ Provide More Information: Share additional details or context — or let the community know if you've found a solution on your own. 3️⃣ Mark a Reply as Answer: If your question has been answered by a reply, mark the most helpful reply as the solution. Note: This dormant notification will only apply to Discussions with the Thank you for helping bring this Discussion to a resolution! 💬 |
Beta Was this translation helpful? Give feedback.
-
Select Topic Area
Question
Body
https://github.com/Thomas-QCD/QCD-Build/tree/main
I use next to build a static build folder, which I then upload to my public repository on main. Github pages runs there and builds just fine, When I click on the url I go to
user.github.io/Repo-name/
This loads the index.html file, also when I add /index.html to the end, same result. Every other resource pointed at by the index.html file goes to
user.github.io/...
which returns 404. For example, my logo image in the repo is at /static/images/logo.png I can load my images when I go to
user.github.io/Repo-name/static/images/logo.png
But it gets requestsed it at
user.github.io/static/images/logo.png
Obligatory 'build works fine on my machine'. I tried the following:
basePath: '/Repo-name', assetPrefix: '/Repo-name/', rewrites: async () => [ { source: '/_next/static/:path*', destination: '/Repo-name/_next/static/:path*', }, ],
Not sure where the issue is coming from. At one point I managed to get the requests to go to the right location and still got 404's.
Beta Was this translation helpful? Give feedback.
All reactions