Virtual Host Alias 301 Redirection #2414
Replies: 2 comments 1 reply
-
I am not sure if I understand you correctly. What would be the use case of such configuration? |
Beta Was this translation helpful? Give feedback.
-
301 is meant for permanent redirection so search engines interpret that as a site has moved. My understanding is that this is the proper way to move a website for SEO purposes. The most common use cases, for me at least, are:
Good call on the pipes usually meaning OR. Which is better? The first seems more syntactically correct but seems less consistent with the other env vars pattern. I personally prefer the first.
As for supporting multiple vhosts, nginx-proxy supports multiple vhosts so I was trying to stay consistent with that. |
Beta Was this translation helpful? Give feedback.
-
PRs #1369 and #1563 are both solving the same problem and are in unfinished states. Both PRs only introduce alias redirection for the first virtual host. Multiple aliases for multiple virtual hosts should be supported.
Before continuing working on either PR, I think it will be beneficial to have a group discussion on the syntax to achieve this.
My proposal is to use the REDIRECT environment variable with the value consisting of vhosts separated by commas and each vhost defines its aliases following a colon, separated by pipes.
Example:
Beta Was this translation helpful? Give feedback.
All reactions