Skip to content

Commit

Permalink
IBX-7818: Fixed direct acces to index.php with long URL (#70)
Browse files Browse the repository at this point in the history
* IBX-7818: Fixed direct acces to index.php with long URL

* IBX-7818: Fixed direct acces to index.php with long URL
  • Loading branch information
OLTC-fperrin authored Oct 8, 2024
1 parent ddf268a commit 1bf4267
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 1bf4267

Please sign in to comment.