Skip to content

base option is case sensitive #2154

Closed
Closed
@billbill72

Description

@billbill72

Version

2.8.1

Reproduction link

https://github.com/dev-shane/vue-router-bug-demo

Steps to reproduce

My app is served under /app/, then I have config /src/router/index.js as follow

export default new Router({
  mode: 'history',
  base: '/app',
  routes: [
    {
      path: '/',
      name: 'Index',
      redirect: {name: 'Home'}
    },
    {
      path: '/home',
      name: 'Home',
      component: Home
    },
    {
      path: '*',
      name: '/error',
      component: Error
    }
  ]
})

But I got this result
http://localhost:8080/app/home to /home
http://localhost:8080/app/Home to /home
http://localhost:8080/App/home to /error
http://localhost:8080/App/Home to /error

What is expected?

http://localhost:8080/app/home to /home
http://localhost:8080/app/Home to /home
http://localhost:8080/App/home to /home
http://localhost:8080/App/Home to /home

What is actually happening?

http://localhost:8080/app/home to /home
http://localhost:8080/app/Home to /home
http://localhost:8080/App/home to /error
http://localhost:8080/App/Home to /error

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions