[Vuejs]-Redirect to 404 Page in hash mode

0👍

Anything after the # in the URL can be dealt with 100% by Vue because the same page is fetched from the web server. If, instead, you change the path of the URL, then the web server will attempt to fetch the webpage at a different location. This situation needs to be dealt with by the server.

Though you aren’t using HTML5 history mode, for your situation the server still needs to be configured to serve your webpage at any path.

I suggest you read the HTML5 History Mode section in the docs.

I’m not familiar with Apache, but maybe something like this will help:

RewriteRule ^/(.+)$ #$1 [NE,R,L]

Leave a comment