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

Fixed exclusion of Acquia apex domains for non-www -> www redirect in .htaccess. #1491

Merged
merged 1 commit into from
Jan 8, 2025
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
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
Loading