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

154
Visualizações
Multiple websites infinite index.php loop

I'm trying to dispatch different Symfony website within the same domain. I actually have 1 folder for each of them like :

html/site1
html/site2
html/...

Here is the .conf (CentOS & Apache) :

AliasMatch "^/site1(.*)" "/var/www/html/site1/public"
<VirtualHost *:80>
    ServerName example.com
    ServerAlias https://example.com

    DocumentRoot /var/www/html/site1/public
    <Directory /var/www/html/site1/public>
        AllowOverride All
        Order Allow,Deny
        Allow from All

        <IfModule mod_rewrite.c>
            Options -MultiViews
            RewriteEngine On
            RewriteCond %{REQUEST_FILENAME} !-f
            RewriteRule ^(.*)$ index.php [QSA,L]
        </IfModule>
    </Directory>
    ErrorLog /etc/httpd/conf.d/site1.log
</VirtualHost>

AliasMatch "^/site2(.*)" "/var/www/html/site2/public"
<VirtualHost *:80>
    ServerName example.com
    ServerAlias https://example.com

    DocumentRoot /var/www/html/site2/public
    <Directory /var/www/html/site2/public>
        AllowOverride All
        Order Allow,Deny
        Allow from All

        <IfModule mod_rewrite.c>
            Options -MultiViews
            RewriteEngine On
            RewriteCond %{REQUEST_FILENAME} !-f
            RewriteRule ^(.*)$ index.php [QSA,L]
        </IfModule>
    </Directory>
    ErrorLog /etc/httpd/conf.d/site2.log
</VirtualHost>

The AliasMatch seems to work, but I get an infinite loop as the result is :

example.com/siteX/index.php/index.php/index.php/index.php/index.php/index.php/... ERR_TOO_MANY_REDIRECTS

It looks like the server is trying to redirect me even if I get a response from the site, because logs are writing as if everything was working.

over 4 years ago · Santiago Trujillo
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