Support the ongoing development of Laravel.io →
posted 10 years ago
Configuration
Last updated 2 years ago.
0
Solution

Exclude this directory from rewriting in .htaccess file:

<IfModule mod_rewrite.c>
    <IfModule mod_negotiation.c>
        Options -MultiViews
    </IfModule>

    RewriteEngine On

    # Exclude directory from rewriting
    RewriteRule ^(directory-to-exclude) - [L]

    # Redirect Trailing Slashes
    RewriteRule ^(.*)/$ /$1 [L,R=301]

    # Handle Front Controller
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteRule ^ index.php [L]
</IfModule>
Last updated 2 years ago.
0

Thanks for the answer. Worked perfect.

Last updated 2 years ago.
0

What about the sub directories below (directory-to-exclude)?

Last updated 2 years ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

tpbsv77 tpbsv77 Joined 12 Mar 2014

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.