我已经将vuejs站点部署到共享主机中,但是路由不起作用。
我在网络服务器的根目录下创建了一个名为newsite
的目录。
在文件中:vue.config.js
我只是更改publicPath
属性以匹配目录:
module.exports = {
publicPath: '/newsite',
该网站在http://mysite.mydomain/newsite处显示初始页面,但是任何点击都会返回到http://mysite.mydomain/login并给出消息:
Not Found The requested URL /login was not found on this server.
需要哪些配置来更正路由,并安全地部署vuejs?