如何配置Apache2重定向URL [英] How to config Apache2 to redirect URL

查看:758
本文介绍了如何配置Apache2重定向URL的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在Apache中配置url重定向.我尝试了一些方法,但没有任何效果.有人可以告诉我解决方案,因为它似乎不太困难.

I am trying to config url redirect in Apache. I have tried some approaches and nothing works. Can someone tell me the solution of this as it doesn't seem too difficult.

我将从以下位置重定向请求:

I am going to redirect request from:

https://myhost/configuration/jmx-console

收件人:

http://myanohterhost/jmx-console

这是HTTP重定向的https.

This is a https to http re-direct.

有人可以指出我正确的方向吗?

Can someone point me to the right direction?

非常感谢!

推荐答案

您可以使用RedirectMatch指令来强制Apache将用户发送到其他地方:

You could use the RedirectMatch directive to force Apache to send the user someplace else:

RedirectMatch 301 ^(.*)$ http://www.anotherserver.com$1

请参阅以下内容:

http://httpd.apache.org/docs/2.2/mod/mod_alias.html#redirectmatch

http://en.wikipedia.org/wiki/URL_redirection#HTTP_status_codes_3xx

这篇关于如何配置Apache2重定向URL的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆