Cara bikin hidden Laravel Code untuk share hosting


Pastikan Laravel framework ada pada framework folder.

1. Create robot.txt in public_html folder, fill this lines:
User-Agent: *
    Disallow:
    Disallow: /framework
    Disallow: /.env

2. Modify your .htaccess to block access to forbidden files / folders:
   <IfModule mod_rewrite.c>
    …
   <IfModule mod_negotiation.c>
               Options -MultiViews -Indexes
   </IfModule>
   RewriteRule /?\.env$ – [F,L]
    …
   </IfModule>

Tinggalkan Balasan

Please log in using one of these methods to post your comment:

Logo WordPress.com

You are commenting using your WordPress.com account. Logout / Ubah )

Gambar Twitter

You are commenting using your Twitter account. Logout / Ubah )

Foto Facebook

You are commenting using your Facebook account. Logout / Ubah )

Foto Google+

You are commenting using your Google+ account. Logout / Ubah )

Connecting to %s