I’m having trouble on a website I made using vuejs, Nosuchkey error 404

Asked

Viewed 47 times

0

I developed a site in vuejs used Vue-router for the paths, but when accessing the page it loads normal, but when I am in a /services and reload the page of the error

<Error>
<Code>NoSuchKey</Code>
<Message>The specified key does not exist.</Message>
<Key>services</Key>
<RequestId>000000000</RequestId>
<HostId>sadsasadsadasdasdassaasddas=</HostId>
</Error>

earlier was giving error 403 forbien, now 404 help me there, if you want to see the repository this in the github my

https://github.com/danielurba/site-personal-car-vuejs

site that is giving problem https://www.personalcarcvel.com.br

1 answer

0


This may be a problem of setting up your Vue-router or on the server.

Check your route settings if they have a deal for direct access or updates, which are new requests to the server.

Both cases are explained here: History Mode Vue-router

You can try adding in your Routes creation the following:

const router = new VueRouter({
    mode: 'hash',
    routes
})

If you are using Apache try adding the following to your . htaccess:

<ifModule mod_rewrite.c>
    RewriteEngine On
  RewriteBase /
  RewriteRule ^index\.html$ - [L]
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteRule . /index.html [L]
</ifModule>

Browser other questions tagged

You are not signed in. Login or sign up in order to post.