Skip to content

Commit e6ac11f

Browse files
committed
[Tests] IBX-7818: Fixed direct acces to index.php with long URL
1 parent 805eb8c commit e6ac11f

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

templates/apache2/vhost.template

+1-1
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@
100100
RewriteRule ^/(css|js|fonts?)/.*\.(css|js|otf|eot|ttf|svg|woff) - [L]
101101

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

105105
RewriteRule .* /index.php
106106
</IfModule>

templates/nginx/ez_params.d/ez_rewrite_params

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ rewrite "^/build/(.*)" "/build/$1" break;
1919
rewrite "^/assets/(.*)" "/assets/$1" break;
2020

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

0 commit comments

Comments
 (0)