Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

201
Vistas
Yii2+ vue project, subpages are redirected from 404

I have yii2+vue project and it works well except sub urls are first redirected from 404. My htaccess file looks as following:

  RewriteEngine On
  RewriteBase /
  RewriteRule ^index\.php$ - [L]
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteRule . /index.php [L]
</IfModule>

Vue router :

router.beforeEach((to, from, next) => {
    store.dispatch('auth/check')
        .then(res => {
            console.log(res);
            if (to.path == '/login' && res.status) {
                next('/')
            } else if (!to.meta.guest && !res.status) {
                next('/login')
            } else {
                next()

            }

        }, () => {
        })
}) 

When I access any subpage, like http://domain/subpage, it shows 404 apache page first..after that redirects to content page managed by vue. Please help

over 4 years ago · Santiago Trujillo
1 Respuestas
Responde la pregunta

0

its apache2 + yii issue not vue js issue router . check this Removing index.php from URL cause 404 in yii

over 4 years ago · Santiago Trujillo Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda