I tried a fresh Trellis/Bedrock install with a .com.au domain. I used this in the name of the folder and as the key in the development/wordpress_sites
and development/vault.yml
files. After vagrant up the site wouldn’t load.
Started over just using .com instead and it just worked.
Is there an issue using .com.au (or I suppose any doubled up domain like .co.uk) domains with Trellis and/or Bedrock?
Yes.
The logic to skip the reversing functionality for subdomains was also
affecting domains starting with `www`. Now it correctly leaves `www`
domains alone and only skips other subdomains.
changed 2 files
with 5 additions
and 4 deletions .
We’ve privately discussed the appropriate fix but are yet to implement.
As all my clients use .com.au domains … this is obviously important to me. Appreciate the reply.
40Q
May 10, 2016, 3:23pm
4
I also work with many .com.ar domains.
Obviously is not a definitive solution, but what I did was to replace line 32 in trellis/lib/plugins/filter/filters.py.
from
if len(host.split('.')) > 2:
to
if len(host.split('.')) > 2 and ( ('.').join(host.split('.')[-2:]) != 'com.au' ):
Let me know if that works for you.
I’m not python expert but digging into this problem I found a plugin which might help with this issue. https://github.com/john-kurkowski/tldextract
Thanks I’ll give that a try. But I’m guessing a future update to Trellis could undo that?
Problem is there’s other three-suffix domains (not sure what you call them), I deal with, e.g. www.example.qld.gov.au
.
40Q
May 10, 2016, 10:41pm
6
Yeah, sure. That was a quick fix, not so elegant, but let me move forward until a better solution is found.
I replaced this line and then re-provisioned the server. Got a 404 error on the .dev url.
Would I need to destroy the server and start again?
40Q
May 17, 2016, 2:42pm
8
You shouldn’t Simeon. If you do vagrant ssh and look at /etc/nginx/sites-enabled/ config you should see changes reflected.
Got the 404 due to Safari being silly. Fix works fine. Thanks so much!
1 Like