Vue is a framework for building Single Page Applications, which means that instead of full page reloads, the content on the page is dynamically swapped out on the client side.
If you are using vue router, you can enable the historyMode
option, which eliminates the use of #
in URLs and allows for traditional, real URLs instead.
According to the documentation:
By default, vue-router uses hash mode - it utilizes the URL hash to mimic a complete URL so that the page does not need to be reloaded when the URL changes.
To remove the hash from the URL, we can switch to the router's history mode, which utilizes the history.pushState API to achieve URL navigation without reloading the page:
const router = new VueRouter({
mode: 'history',
routes: [...]
})
This configuration will give you "normal" URLs similar to those found elsewhere on the internet.