I have recently deployed a fullstack vue project and most of the pages behave propely apart from one page that has a page not found. All pages are written in the exact same way and routes are manages by Vue routes. All pages like home page, create blog page and read a blog page all work apart from your profile page. Even though that are all written and managed the same way. Does anyone have any pointers on why it isnt working? the full website is here: https://rainbow-tarsier-75c44f.netlify.app/
Hi, @Kroplewski-M. To troubleshoot we need to know the page which is not working. The URL you have shared is returning a 200 response:
$ curl --compressed -svo /dev/null https://rainbow-tarsier-75c44f.netlify.app/ 2>&1 | egrep '^< ' < HTTP/2 200 < age: 1 < cache-control: public, max-age=0, must-revalidate < content-encoding: gzip < content-type: text/html; charset=UTF-8 < date: Thu, 24 Nov 2022 05:34:26 GMT < etag: "8bc426d0dbbc7e3fd35d57c4f6955111-ssl-df" < server: Netlify < strict-transport-security: max-age=31536000; includeSubDomains; preload < vary: Accept-Encoding < x-nf-request-id: 01GJM22KMYJD3YZN84YGPPRZKF < content-length: 1990 <
What URL returns the page not found?
Hi can you share a repo for this site?
Hi @Kroplewski-M I can’t see a
_redirects file in your repo. Have you had a look at this post?
Hi, @kylesloper thanks for the reply, i added it in and still get the issue. I dont know if im doing it wrong but i did exactly what the answer said with no effect
Thanks for the follow-up.
Hi @Melvin , how would I place it in the static directory. I think I’m being dumb here but I don’t know what it means by that
public as a directory for static, unchanging files. Create a
public directory and move your
_redirects to it
As @kylesloper correctly mentions, you can create a
public directory at the toot and add the
_redirect file to that. Another option would be to create a
netlify.toml file to the root and add:
[[redirects]] from = "/*" to = "/index.html" status = 200 force = false
Let us know if you continue to have issues. Thanks!
Ayy, i added the netlify.toml file and it worked. Thanks!
Hi @Kroplewski-M ! Thank you for coming back and letting us know this worked for you! We appreciate the feedback dearly.