laravel/public/.htaccess
Andrey Helldar bf59cd3ce1 Added "-Indexes" option
If you open the `/css`, `/js`, or any other folder on the default server, you can see the list of files in the directory.
The `-Indexes` option forbids viewing directory files via the web interface.
2017-09-18 20:42:11 +03:00

22 lines
593 B
ApacheConf

<IfModule mod_rewrite.c>
<IfModule mod_negotiation.c>
Options -MultiViews -Indexes
</IfModule>
RewriteEngine On
# 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]
# Handle Authorization Header
RewriteCond %{HTTP:Authorization} .
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
</IfModule>