Skip to content

Commit

Permalink
FIX Only block root vendor folder
Browse files Browse the repository at this point in the history
Use RewriteRule instead to take in account any subfolder via RewriteBase. Deny ss-cache and composer via RewriteRule too.
  • Loading branch information
colymba committed Apr 27, 2013
1 parent 5f91c37 commit 41c0f80
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions dev/install/install.php5
Expand Up @@ -1277,16 +1277,15 @@ HTML;
ErrorDocument 404 /assets/error-404.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>
SetEnv HTTP_MOD_REWRITE On
RewriteEngine On
$baseClause
RewriteRule ^vendor(/|$) - [F,L,NC]
RewriteRule silverstripe-cache(/|$) - [F,L,NC]
RewriteRule composer\.(json|lock) - [F,L,NC]
RewriteCond %{REQUEST_URI} ^(.*)$
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_URI} !\.php$
Expand Down

0 comments on commit 41c0f80

Please sign in to comment.