Redirect domain

Hi all.

I know we cannot edit nginx.conf as it gets overwritten everything we upgrade the version, but I need to redirect a domain hosted in my MIAB instance to another domain.

For example:
From to Does anybody have a workaround for such a thing?


1 Like

I think there may be a hidden feature in MiaB to help with this, but I don’t use it so I haven’t explored it. And I’m not sure if it is possible with DNS entries. I probably should actually figure out a better solution.

However, since nobody has replied, here is one way that can work.

You can use a simple HTML file to perform the redirect:

<!DOCTYPE html>
<meta HTTP-EQUIV="REFRESH" content="0; url=//" />

Note that this is not permanent, so unless users update their links, they will continue to load the page, plus some devices or apps may not read the HTML headers. Also note that permanent redirects are permanent.

It is possible to get a local nginx configuration per domain. I learned about this last week. Create a file in /home/user-data/www where you can set the redirect. Don’t include the server {} part form the nginx config only return 301$request_uri;

I haven’t tested this so try first…