Npm 生成后未找到vue页面
我和你有一条路Npm 生成后未找到vue页面,npm,vue.js,vuejs2,vue-router,Npm,Vue.js,Vuejs2,Vue Router,我和你有一条路 http://localhost:8080/user/reset 当我在dev的时候,它能找到工作 但在构建之后,我将dist放在localhost中 http://localhost/user/reset 它说找不到页面。 但我可以通过点击路由器链接从主页访问它,但不能通过浏览器中的直接地址 { path: '/user/reset', component: function(resolve) {
http://localhost:8080/user/reset
当我在dev的时候,它能找到工作
但在构建之后,我将dist放在localhost中
http://localhost/user/reset
它说找不到页面。
但我可以通过点击路由器链接从主页访问它,但不能通过浏览器中的直接地址
{
path: '/user/reset',
component: function(resolve) {
require(['@/components/view/reset.vue'], resolve)
}
}
这是我在routes.js中的路径,我忘了放.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>
重新启动发动机
重写基/
重写规则^index\.html$-[L]
重写cond%{REQUEST_FILENAME}-F
重写cond%{REQUEST_FILENAME}-D
重写规则/index.html[L]
更多细节。。。