看不见的Apacheredirect

我想subdomain.mydomain.com无形中redirect到https:// [myServerIP]:2083 。

(这里有一个SSL问题)。

到目前为止,我设法做到了,但redirect是可见的,我不想要它:

RewriteCond %{HTTPS} off RewriteCond %{HTTP_HOST} ^subdomain.\.mydomain\.com$ RewriteRule ^ https://[myServerIP]:2083/ 

这将是一种方式来实现相同的redirect,同时永久保持我的美丽的“subdomain.mydomain.com”在地址栏?

编辑与ProxyPass指令:

我使用ProxyPass尝试了一些变体,但它仍然会更改地址栏中的url:

 ServerName subdomain.mydomain.com <Location /> ProxyPass https://[myServerIP]:2083/ ProxyPassReverse https://[myServerIP]:2083/ </Location> RewriteCond %{HTTPS} off RewriteCond %{HTTP_HOST} ^subdomain\.mydomain\.com$ RewriteRule ^ https://[myServerIP]:2083/ 

EDIT2:

它仍然不起作用:

 #non SSL ServerName subdomain.mydomain.com #SSL! <Location /> ProxyPass https://[myServerIP]:2083/ ProxyPassReverse https://[myServerIP]:2083/ </Location> 

EDIT3:

现在它使用SSLProxyEngine指令工作:

 SSLProxyEngine on ServerName subdomain.mydomain.com <Location /> ProxyPass https://[myServerIP]:2083/ ProxyPassReverse https://[myServerIP]:2083/ </Location> 

我现在可以访问我的login界面(cPanel)。 但是,一旦我login,它不会redirect到下一页subdomain.mydomain.com/cpsess5850710203/

您可以使用ProxyPassProxyPassReverse指令实现您的目标(不更改地址栏)。 例如:

 <Location /> ProxyPass https://[myServerIP]:2083 ProxyPassReverse https://[myServerIP]:2083 </Location> 

这将内部请求该网站并将其提供给浏览器。

你正在寻找的是一个反向代理