Skip to content

Commit

Permalink
Merge branch '1.10'
Browse files Browse the repository at this point in the history
  • Loading branch information
andrerom committed Jul 26, 2017
2 parents 07aa3b5 + 293580e commit 97ac059
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
3 changes: 3 additions & 0 deletions doc/apache2/vhost.template
Expand Up @@ -102,6 +102,9 @@
RewriteCond %{ENV:SYMFONY_ENV} !^(dev)
RewriteRule ^/(css|js|fonts?)/.*\.(css|js|otf|eot|ttf|svg|woff) - [L]

# Prevent access to website with direct usage of app.php in URL
RewriteRule ^/(.+/)?app\.php - [R=404,L]

RewriteRule .* /app.php
</IfModule>

Expand Down
5 changes: 5 additions & 0 deletions doc/nginx/ez_params.d/ez_rewrite_params
Expand Up @@ -17,5 +17,10 @@ rewrite "^/w3c/p3p\.xml" "/w3c/p3p.xml" break;
rewrite "^/bundles/(.*)" "/bundles/$1" break;
rewrite "^/assets/(.*)" "/assets/$1" break;

# Prevent access to website with direct usage of app.php in URL
if ($request_uri ~ "^/(.+/)?app\.php") {
return 404;
}

rewrite "^(.*)$" "/app.php$1" last;

0 comments on commit 97ac059

Please sign in to comment.