because vue-router has "- sharp" by default, but when forwarding the address in Wechat"s official account, the address "- sharp", including all future addresses, will be removed directly, resulting in the inability to share the page.
so I set the route pattern to history, according to the official configuration of Vue, and because our project is rendered by the server, I set base to the corresponding mobile.
so that I can access the home page through www.xxx.com/mobile, and it"s normal to jump to other pages in the interface with vue-router.
but here comes the fucking problem. For example, if I share the www.xxx.com/mobile/A/B path to a friend, then my friend will report a nginx error if he visits this path directly.
then I added the following configuration to nginx, as officially recommended by vue.
location / {
try_files $uri $uri/ /mobile [mobile]
}
but it still doesn"t work. How should I configure it here?