How do I do what I did in htaccess in nginx?

Use nginx outside of docker container (see Running other websites on the same machine as Discourse) and you can rewrite those URLs using nginx configuration.

Syntax is:

server {
  server_name  sub.domain.com;
  rewrite ^(.*) http://12.34.56.78/a/particular/path/ permanent;
}
3 Likes