Skip to content

Commit

Permalink
Fixed exclusion of Acquia apex domains for non-www -> www redirect in…
Browse files Browse the repository at this point in the history
… `.htaccess`.
  • Loading branch information
AlexSkrypnyk committed Jan 8, 2025
1 parent adbfc0e commit ff32b11
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions .vortex/tests/bats/_helper.bash
Original file line number Diff line number Diff line change
Expand Up @@ -845,7 +845,7 @@ assert_files_present_integration_acquia() {
assert_symlink_not_exists "hooks/prod/post-db-copy"

assert_file_exists "${webroot}/sites/default/includes/providers/settings.acquia.php"
assert_file_contains "${webroot}/.htaccess" "RewriteCond %{ENV:AH_SITE_ENVIRONMENT} prod [NC]"
assert_file_contains "${webroot}/.htaccess" "RewriteCond %{HTTP_HOST} !\.acquia-sites\.com [NC]"

if [ "${include_scripts:-}" -eq 1 ]; then
assert_dir_exists "scripts"
Expand All @@ -867,7 +867,7 @@ assert_files_present_no_integration_acquia() {
assert_dir_not_exists "hooks"
assert_dir_not_exists "hooks/library"
assert_file_not_exists "${webroot}sites/default/includes/providers/settings.acquia.php"
assert_file_not_contains "${webroot}/.htaccess" "RewriteCond %{ENV:AH_SITE_ENVIRONMENT} prod [NC]"
assert_file_not_contains "${webroot}/.htaccess" "RewriteCond %{HTTP_HOST} !\.acquia-sites\.com [NC]"
assert_file_not_contains ".env" "VORTEX_ACQUIA_APP_NAME="
assert_file_not_contains ".env" "VORTEX_DB_DOWNLOAD_ACQUIA_DB_NAME="
assert_file_not_contains ".ahoy.yml" "VORTEX_ACQUIA_APP_NAME="
Expand Down
2 changes: 1 addition & 1 deletion web/.htaccess
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ AddEncoding gzip svgz
# Redirect all non-ww requests to www.
RewriteCond %{HTTP_HOST} .
#;< ACQUIA
RewriteCond %{ENV:AH_SITE_ENVIRONMENT} prod [NC] # only Production environment.
RewriteCond %{HTTP_HOST} !\.acquia-sites\.com [NC]
#;> ACQUIA
RewriteCond %{HTTP_HOST} !^www\. [NC]
RewriteRule ^ http%{ENV:protossl}://www.%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
Expand Down

1 comment on commit ff32b11

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.