Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IBX-7818: Fixed direct acces to index.php with long URL #70

Merged
merged 3 commits into from
Oct 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading