daniels
1 month ago
160
2
Laravel

How to ignore project directory in laravel public folder.

Posted 1 month ago by daniels

I have a full PHP project on public folder that i need Laravel to ignore, however, Laravel catches the routes as 404.

example: https://www.xxxxx.com should ignore project on https://www.xxxxx.com/project/

I have this htaccess file code. I need Laravel to ignore the project links, they use different databases.

    <IfModule mod_negotiation.c>
        Options -MultiViews -Indexes
    </IfModule>
    
    RewriteEngine On

    ##
    ## You may need to uncomment (remove #) the following line for some hosting environments,
    ## if you have installed to a subdirectory, enter the name here also.
    ## Example: for https://site.com enter: "/", for https://site.com/something enter: "/something/"
    ##
    RewriteBase /
    # RewriteRule ^(ewala) - [L]
    RewriteCond %{REQUEST_URI} !^/ewala/.*$
     # Redirect Trailing Slashes...
    RewriteRule ^(.*)/$ / [L,R=301]

    # 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]

    # Send Requests To Front Controller...
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteRule ^ index.php [L]
</IfModule>```

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