Closed MikeTheCanuck closed 6 years ago
On further consideration, it isn't possible to direct requests from http://budget.civicpdx.org to http://2017.civicpdx.org/budget using just DNS - DNS (domain name) services are only able to redirect from http://budget.civicpdx.org to http://2017.civicpdx.org.
To accomplish the complete redirect we're after would require hosting some application code that directs from the original requested URL to the full target URL.
For example, we could place an index.html
in the root of the legacy bucket for budget.civicpdx.org, and the contents of that index.html file would be <meta http-equiv="refresh" content="0; url=http://2017.civicpdx.org/budget/" />
(cf. stackoverflow)
Turns out it's even easier to enable a redirect from an S3 static-website-hosting setup to another URL - just enable "redirect requests" in the bucket Properties like so:
Don't even need to have any files in the S3 bucket, so let's empty those suckers!
Thus I've emptied the buckets that were hosting those sites, deleted the staging buckets that weren't even being used anymore, and tar.gz
'd the contents of all those buckets to the s3://civic-devops/backups/deleted-buckets location.
All of the 2017 React sites have been published as routes under the http://2017.civicpdx.org domain:
However, we still also have the S3 bucket-published sites (and their corresponding DNS records):
Recommendation