36 lines
989 B
ApacheConf
36 lines
989 B
ApacheConf
RewriteEngine On
|
|
|
|
RewriteCond %{REQUEST_FILENAME} !-d
|
|
RewriteRule ^(.*)/$ /$1 [L,R=301]
|
|
|
|
RewriteCond %{REQUEST_URI} !(\.css|\.js|\.png|\.jpg|\.gif|\.woff|robots\.txt)$ [NC]
|
|
RewriteCond %{REQUEST_FILENAME} !-d
|
|
RewriteCond %{REQUEST_FILENAME} !-f
|
|
RewriteRule ^ index.php [L]
|
|
|
|
RewriteCond %{REQUEST_FILENAME} !-d
|
|
RewriteCond %{REQUEST_FILENAME} !-f
|
|
RewriteCond %{REQUEST_URI} !^/public/
|
|
RewriteRule ^(assets)/(.*)$ public/$1/$2 [L,NC]
|
|
|
|
# disable viewing all hiden files
|
|
RedirectMatch 403 /\..*$
|
|
|
|
# disable browsing other files in root
|
|
RedirectMatch 403 /composer.*
|
|
RedirectMatch 403 /artisan
|
|
RedirectMatch 403 /phpunit.xml
|
|
|
|
# disable browsing directories
|
|
# this should be solved also with Option -Indexes, however...
|
|
RedirectMatch 403 ^/app
|
|
RedirectMatch 403 ^/artisan
|
|
RedirectMatch 403 ^/bootstrap
|
|
RedirectMatch 403 ^/config
|
|
RedirectMatch 403 ^/database
|
|
RedirectMatch 403 ^/modules
|
|
RedirectMatch 403 ^/scripts
|
|
RedirectMatch 403 ^/storage
|
|
RedirectMatch 403 ^/tests
|
|
RedirectMatch 403 ^/vendor
|