News for hackers. Stuff that matters.
Re:Show HN: Can you lose at Wordle if you tried? by soxocx on Tuesday May 31, 2022 @04:19PM (#31574423)
> 4. Trying to get www.dontwordle.com and dontwordle.com to take you to the same URL (either www.dontwordle.com or dontwordle.com) and still support TLS and only use the tech I mentioned above. I actually still don’t have it working perfectly. I know of a solution, but it’s overly complicated

If you use Cloudfront with an S3 bucket as origin for _dontwordle.com_, just create a second Cloudfront with an S3 Bucket for _www.dontwordle.com_ and enable "static website hosting" to redirect to "dontwordle.com" on the second bucket.

Re:Show HN: Can you lose at Wordle if you tried? by dontwordle on Tuesday May 31, 2022 @05:01PM (#31574904)
So you can do this, but it won't support TLS to my knowledge. At least in my testing, it will work to navigate to www.dontwordle.com (you will get redirected to https://dontwordle.com). However, if you tried navigating _directly_ to https://www.dontwordle.com, that would not work. In fact, you can try clicking on https://www.dontwordle.com right now, and it won't work :) To be fair, currently I do not have it implemented exactly the way you described, but I encountered this exact same behavior when I tried it that way
Re:Show HN: Can you lose at Wordle if you tried? by aidos on Tuesday May 31, 2022 @05:38PM (#31575274)
Yup, been there. Have a look to see if cloudflare will do what you need within the free plan. You just point it at the bucket, add a rule for the redirect and all the tls is handled for you. It’s pretty painless. Feel free to ping me if you want to run through the steps.
Re:Show HN: Can you lose at Wordle if you tried? by soxocx on Tuesday May 31, 2022 @06:05PM (#31575500)
I use the setup described.

It was some tinkering around with bucket name (has to match the subdomain.domain.tld) and the cloudfront origin settings. But it works flawlessly. Feel free to ping me if you need details.

See links below.

coindex.de www.coindex.de

Re:Show HN: Can you lose at Wordle if you tried? by gitgud on Tuesday May 31, 2022 @10:21PM (#31577330)
Could try serving a client side redirect. Just an index.html page that has a script that redirects the browser to the https version

    <script>document.location.href = https://dontwordle.com</script>
Re:Show HN: Can you lose at Wordle if you tried? by hunter2_ on Wednesday June 01, 2022 @01:37AM (#31578524)
Assuming that works, I don't see the need for Javascript when a meta refresh achieves the same with just HTML.
Re:Show HN: Can you lose at Wordle if you tried? by gitgud on Wednesday June 01, 2022 @04:56AM (#31579572)
Well the game needs JavaScript to run anyway so...

Haven't heard of meta refresh though, thanks for sharing