[Vuejs]-How to access a Vue route directly

0👍

A .htaccess file is a configuration file for an Apache webserver. localhost:8080 is a dev server and is not run by Apache, so the .htaccess file is not used there.

The dev server should pick up the url automatically. When it does not, the most likely culprit is a base url or public path not set correctly, or set to the production variant. For example, if you set it to /app/, you have to access localhost:8080/app/login to reach your login page. Since the NODE_ENV environment variable is set, you can set the public path to / for the development server while still keeping a custom public path for a production build.

Leave a comment