Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

206
Visualizações
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 Respostas
Responde à pergunta

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 Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda