mirror of
https://github.com/silverstripe/silverstripe-installer
synced 2024-10-22 17:05:33 +02:00
BUGFIX #34 Only block root vendor folder
Use RewriteRule instead to take in account any subfolder via RewriteBase. Deny ss-cache and composer via RewriteRule too. Move to RewriteRules
This commit is contained in:
parent
16c9312f29
commit
aa07a0edd8
12
.htaccess
12
.htaccess
@ -20,15 +20,13 @@
|
|||||||
ErrorDocument 404 /assets/error-404.html
|
ErrorDocument 404 /assets/error-404.html
|
||||||
ErrorDocument 500 /assets/error-500.html
|
ErrorDocument 500 /assets/error-500.html
|
||||||
|
|
||||||
<IfModule mod_alias.c>
|
|
||||||
RedirectMatch 403 /silverstripe-cache(/|$)
|
|
||||||
RedirectMatch 403 /vendor(/|$)
|
|
||||||
RedirectMatch 403 /composer\.(json|lock)
|
|
||||||
</IfModule>
|
|
||||||
|
|
||||||
<IfModule mod_rewrite.c>
|
<IfModule mod_rewrite.c>
|
||||||
SetEnv HTTP_MOD_REWRITE On
|
SetEnv HTTP_MOD_REWRITE On
|
||||||
RewriteEngine On
|
RewriteEngine On
|
||||||
|
|
||||||
|
RewriteRule ^vendor(/|$) - [F,L,NC]
|
||||||
|
RewriteRule silverstripe-cache(/|$) - [F,L,NC]
|
||||||
|
RewriteRule composer\.(json|lock) - [F,L,NC]
|
||||||
|
|
||||||
RewriteCond %{REQUEST_URI} ^(.*)$
|
RewriteCond %{REQUEST_URI} ^(.*)$
|
||||||
RewriteCond %{REQUEST_FILENAME} !-f
|
RewriteCond %{REQUEST_FILENAME} !-f
|
||||||
|
Loading…
Reference in New Issue
Block a user