Support the ongoing development of Laravel.io →
posted 8 years ago
Security

Hi, This laravel default .htaccess file:

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

    RewriteEngine On

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

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

I'm trying to deny for all and allow access by ip, adding this line at the beginning:

order deny,allow
deny from all
allow from my-ip

by it does not work Can't anybody help me please?

Last updated 2 years ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

marymvlg28 marymvlg28 Joined 19 Jan 2015

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.

© 2025 Laravel.io - All rights reserved.