Rewrite internally from one URL (some path) to another URL (another path)

Is it possible to rewrite/proxy a URL to another URL having different paths ? It should not be just a redirect, and should be a internal proxying to the other URL, so that the browser address bar shows the original URL only. Note, the domain/hostnames will be different for both the URLs. Please suggest.

e.g.
Rewrite or Proxy from, 
https://www.example1.com/a/b 
to
https://www.example2.com/p/q/r
1
задан 27 July 2017 в 16:03
1 ответ

да, это простой прокси, который можно сделать с помощью mod_proxy для apache. https://httpd.apache.org/docs/2.4/fr/mod/mod_proxy.html

например. в вашем виртуальном хосте vonf:

<VirtualHost *:80>
    ServerName streaming.domaine.tld
    ProxyPass /a/b/ https://www.example2.com/p/q/r/
    ProxyPreserveHost On
</VirtualHost>
1
ответ дан 3 December 2019 в 23:27

Теги

Похожие вопросы