Redirect Vue.js

Asked

Viewed 199 times

1

I am having the following scenario... I own a blog that when clicking on a link is redirected to a page in Vue.js. However when it is redirected the page breaks and returns error 404. Any / after the site root in Vue.js is breaking.

Ex: lawyers.com enters normally and also redirected from the blog comes normal. When placing in the lawyer mode.com/contact is returned error 404.

Obs: By entering the url from within the site they are presented normally.

my file Vue.config.js is as follows:

module.exports = {
       baseUrl: '/'
}

Has anyone experienced this problem or knows the solution??

  • If the solution to your problem has been answered below accepted as answer to your question.

1 answer

4

According to the Documentation, baseUrl is deprecated since version 3.3 of Vuejs, being necessary the use of publicPath.

module.exports = {
  publicPath: '/',
}
  • I’m having to make some changes that the client requested, but I didn’t develop in Vue.js.. you say do something like this: module.Exports = { publicPath: '/' }

  • I wasn’t very documentation-based

  • 1

    would be just that Betini, updated the answer with the example.

  • was, thank you =]

  • Gina, I’m glad it worked ;)

Browser other questions tagged

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