'How to configure Apache for Vue Router in history mode used in Wordpress plugin

I have a Vue application as a WP plugin, and currently I am migrating it to SPA using Vue router, history mode is used in Vue router, so I will need a redirect from Apache for every route that doesnt exists anymore. What is the way of doing this without reload if user types url in browser and how to redirect that request that to do routing on frontend side without killing current vue instance and reloading whole page, is that even possible with wordpress. Thanks in advance!

I was trying some virtual host configuration and setting fallback resource but without any success.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source