apache ssl 重定向到 FQDN 完好无损的子 url 路径?
我试图在 Apache HTTP 服务器(httpd.conf)中完成的是将用户从默认页面 http://www.abc.com/ 重定向到 https://www .abc.com/xxx?var1=1&var2=2 这也保持 FQDN 完整。
我如何在 apache 中实现此功能? 以下是我在 httpd.cof 中的配置设置,该设置不起作用。
RedirectMatch 301 / https://%{HTTP_HOST}/webapp/wcs/stores/servlet/DMCInitialPageCmd?langId=-1& ;storeId=10001&catalogId=10051
- 在IE浏览器上,测试url访问。例如:test.abc.com,如何正确显示主机名/FQDN?从浏览器获取此响应...
https://%25{http_host}/webapp/wcs/stores/servlet/DMCInitialPageCmd?langId=-1/ storeId=10001/catalogId=10051?langId=-1&storeId=10001&catalogId=10051
What I am trying to accomplish in Apache HTTP server (httpd.conf) is to redirect a user from a default page http://www.abc.com/ to https://www.abc.com/xxx?var1=1&var2=2 which also keeps FQDN intact.
How do I make this work in apache?
Below is my config setting in httpd.cof which is not working.
RedirectMatch 301 / https://%{HTTP_HOST}/webapp/wcs/stores/servlet/DMCInitialPageCmd?langId=-1&storeId=10001&catalogId=10051
- on the IE browser, testing the url access. eg: test.abc.com, how do I correctly display the hostname/fqdn? getting this response from the browser...
https://%25{http_host}/webapp/wcs/stores/servlet/DMCInitialPageCmd?langId=-1/storeId=10001/catalogId=10051?langId=-1&storeId=10001&catalogId=10051
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
怎么会失败呢?我不认为 RedirectMatch 接受变量扩展(如
%{HTTP_HOST}
)...为此,我通常使用mod_rewrite
:How is it failing? I don't think that RedirectMatch accepted variable expansion (like
%{HTTP_HOST}
)...for this, I typically usemod_rewrite
: