0

My apologies as I don't know the correct terminology for this issue, which perhaps is half my problem...

I've created an SPA with VueJS – a small portfolio site – and am currently using VueRouter to create a /information route.

I want this route to be shareable by URL – so that if I link you to www.example-url.com/information, then this should load that route. However at the minute I get the error message: 404 Not Found nginx/1.8.1

Is a pre-render plugin like https://github.com/chrisvfritz/prerender-spa-plugin the appropriate solution to this problem? From my understanding this would solve the issue, but it's not explicitly advertised as a benefit of pre-rendering so I'm a little unsure.

Here is the site in question: http://isabellaburley.com/information

Many thanks,

Simon Rogers
  • 101
  • 11

1 Answers1

0

add this to your nginx vhost config:

server {
    ...

    location / {
        try_files $uri $uri/ @rewrites;
    }

    location @rewrites {
        rewrite ^(.+)$ /index.html last;
    }

    ...
}