Kei11
174
1
Servers

AllowOverride None + Multiple Laravel App in one server

Posted 2 months ago by Kei11

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?

Please sign in or create an account to participate in this conversation.

Reply to

Use Markdown with GitHub-flavored code blocks.