5 months ago

sub.mydomain.com redirect to mydomain.com/sub with Forge|Digital Ocean

Posted 5 months ago by dgo

I have wildcard subdomains setup with ssl cert. I want to accomplish this:

sub.mydomain.com redirects 301 to mydomain.com/sub

Seems like this should be easy... but

1. Can't add /sub to a dns record at Digital Ocean.

2. Can't get the Forge redirects from the panel to work (probably syntax).

3. Don't know enough to edit the Nginx Config file

***bonus - would love to have subs not redirected to hit a 404 location...

Please sign in or create an account to participate in this conversation.