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

149
Views
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
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!