ユーザーを test1.domain.com から test2.domain.com にリダイレクトしたかったのです。url_rule の「host」とともに、url_map の「host_matching」を試しました。動作していないようで、404 エラーが表示されます。たとえば、「localhost.com:5000」にアクセスすると、「test.localhost.com:5000」に移動する必要があります。
from flask import Flask, url_for, redirect
app = Flask(__name__)
app.url_map.host_matching = True
@app.route("/")
def hello1():
#return "Hello @ example1!"
return redirect(url_for('hello2'))
@app.route("/test/", host="test.localhost.com:5000")
def hello2():
return "Hello @ test!"
if __name__ == "__main__":
app.run()
出来ますか?誰も試したことがありますか?前もって感謝します..