The vue project is placed on AWS, and the front end is configured with history mode to remove the-sharp number, and how to configure the server side

the front end enables history mode through mode. How does the back end need to be set?

what is found on the official website and Baidu google is the configuration of apache and nginx, but not how to configure AWS


backend does not need to be configured


I don't know what aws is, but if the framework provides page services at the back end, I have used ftl to do similar functions. The general idea is as follows:
first of all, you can unify your history routes with a prefix, such as / views
secondly, the back-end page service can do a fuzzy match, matching to / views/*, will be directed to a template html file.
once again, load your basic entry files such as app.js, main.js, vendor.js, etc., in this html. Or do a relational mapping between your js path and your page address, and parse the corresponding js
through the page path. Finally, that's about it

.

for reference only


AWS refers to Amazon's cloud service? Or is it an environment we don't know about? If it's not the environment, what's your backstage environment? Apache or nginx?? Or java,php,nodejs. Take a look at that keyword you are more familiar with.

generally speaking, the backend does not need to be configured. You can use it.

what you're talking about is that you want to point all visits to index.html, which is usually configured in the back-end routing. It depends on each environment


I don't understand what it means to put it on AWS. Which service is used?.
looks at StarkOverFlow and seems to have similar question , and one of the answers is to redirect ErrorPages to index.html. For more details, please click to see

.

if you use histroy mode, the backend needs to configure all path of rewrite to / so that index.html can handle route.

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e482f9-44cb1.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e482f9-44cb1.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?