current position:Home>The problem of Vue routing history mode jumping to a new window

The problem of Vue routing history mode jumping to a new window

2022-02-02 21:54:28 CSDN Q & A

vue The middle road is used by history Mode time , After packing and putting it on the server, click to open a new window and report 404 How to solve the problem of , Can anyone give me some guidance




Refer to the answer 1:

history After the mode is deployed, if it is not configured, a sub page will appear 404 The situation of

solve :
Method 1. Change to hash Pattern
Method 2. nginx Profile to configure

location / {  try_files $uri $uri/ /index.html$args;}

If help , Excuse me 【 Adopt this answer 】




Refer to the answer 2:



Refer to the answer 3:

Background configuration agent , For example, use nginx




Refer to the answer 4:

copyright notice
author[CSDN Q & A],Please bring the original link to reprint, thank you.
https://en.primo.wiki/2022/02/202202022154261697.html

Random recommended