Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

153
Views
Vue 3 Application redirects to main domain from subdirectory and routes failed to work

can somebody suggest to me what is going wrong with my application here? I have a vue 3 SPA. I'm hosting it here for like

example.com/subdirectory/myapp/

It redirects to example.com after loading the app from the same path

example.com - redirected here with routes e.g example.com/create or example.com/delete

What I want to achieve is loading all routes from the subdirectory path like

example.com/subdirectory/myapp/create
example.com/subdirectory/myapp/delete

etc.

My vue.config.js code is as below:

module.exports = {
    publicPath: './',
};

My Routes code is as below:

import { createWebHistory, createRouter} from 'vue-router'

const routes = [
    {path: '/', name: 'list', component: () => import('@/views/List')},
    {path: '/create', name: 'create', component: () => import('@/views/Create')},
    {path: '/delete', name: 'delete', component: () => import('@/views/Delete')},
]

const router = createRouter({
    history: createWebHistory(),
    routes
})

export default router

Please guide me what is something wrong I'm doing here? I'm guessing it's something with my routing config for apache serving but what is that? I'm not able to figure it out.

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!