Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

Kei11's avatar
Level 1

AllowOverride None + Multiple Laravel App in one server

Hello guys!

So in my working server, I have multiple laravel applications and also I am not allowed to use any .htaccess file (AllowOverride None).

So instead of using .htaccess I transferred it inside httpd-userdir.conf and I tried to wildcard Directory directive to avoid the repetition

<Directory "/home/www/*/public">
    AllowOverride None
    php_flag engine on
    Require all granted

    RewriteEngine On

    # Handle Authorization Header
    RewriteCond %{HTTP:Authorization} .
    RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]

    # Redirect Trailing Slashes If Not A Folder...
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_URI} (.+)/$
    RewriteRule ^ %1 [L,R=301]

    # Handle Front Controller...
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteRule ^ index.php [L]
</Directory>

I am having an Internal Server Error. Can anyone please tell me what is wrong in my RewriteRule?

0 likes
1 reply
douglasakula's avatar

<Directory /home/www/>
        Options Indexes FollowSymLinks
        AllowOverride All
        Require all granted
</Directory>

Then restart the web server

Please or to participate in this conversation.