【发布时间】:2016-08-18 16:27:42
【问题描述】:
我正在管理一个网站,该网站目前正在运行一个非常标准的 varnish/apache 设置。客户端需要添加一个从路径/查询字符串透明地提供服务的新域,以便创建其站点的轻量级版本。例如:
用户访问指向与 example.com 相同的服务器的 mobile.example.com
Varnish 将 mobile.example.com 请求重写为 example.com/mobile?theme=mobile
用户收到由 apache 从 example.com/mobile?theme=mobile 提供的页面,但仍停留在 mobile.example.com
我们需要点击路径并在此处添加查询字符串,并维护用户输入的任何路径,即:mobile.example.com/test 应该在 example.com/mobile/test 处提供内容?主题=移动
关于使用 Varnish 4 执行此操作的任何提示?有可能吗?
【问题讨论】:
标签: apache .htaccess varnish varnish-vcl varnish-4