Skip to content

Commit

Permalink
IBX-7818: Fixed direct acces to index.php with long URL
Browse files Browse the repository at this point in the history
  • Loading branch information
OLTC-fperrin committed Jul 9, 2024
1 parent e29e5b4 commit ea2a901
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion resources/templates/apache2/vhost.template
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@
RewriteRule ^/(css|js|fonts?)/.*\.(css|js|otf|eot|ttf|svg|woff) - [L]

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

RewriteRule .* /index.php
</IfModule>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ rewrite "^/build/(.*)" "/build/$1" break;
rewrite "^/assets/(.*)" "/assets/$1" break;

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

Expand Down

0 comments on commit ea2a901

Please sign in to comment.