我想在我的网站上创建动态子域。我知道如何使用 apache2 mod_rewrite 创建它(将 sub.domain.com 等网址转换为 domain.com/sub/)。但我有一个问题:我不知道我的 Web 应用程序如何了解这个子域。
我如何使用 Struts2 做到这一点?
最佳答案
您可以通过在 mod_rewrite 或 nginx 配置的 http header 传递它
关于java - 动态子域和 struts2,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2356735/