在Azure应用程序网关中,可以执行以下重定向:
example.com/folder1/page1.html > newexample.com
www.example.com/folder1/page1.html > newexample.com
example2.com/folder2/page2.html > newexample.com/page2.html
我为第一个重定向添加了一个侦听器和规则,并且该规则有效。我想通过Azure仪表板添加多个规则,但看到以下错误:
There are no unassociated listeners available. Create a new listener and then try again.
当我尝试添加另一个基本的侦听器时,我看到:
This HTTP listener cannot use the same frontend port as an existing listener.
另外,如果我将现有规则更改为重定向到另一个URL,则它似乎没有更新-我被重定向到了原始站点。
任何帮助表示赞赏。
我决定在Nginx中设置虚拟主机并重定向域。这似乎比配置Azure应用程序网关简单得多。
<VirtualHost *:8080>
ServerName www.example.org.uk
ServerAlias example.org.uk
Redirect 301 / https://www.newexample.com/abc/def/ghi
</VirtualHost>