Redirecting a subdirectory to another domain: Apache

This can be done by including the following directives:

LoadModule proxy_module modules/
LoadModule proxy_http_module modules/

ProxyPass /mail
ProxyPassreverse /

These should be included in the file:

/etc/apache2/httpd.conf if you have a single site on the server

/etc/apache2/sites-enabled/ if you host it on i-mscp


You are reading this post on Joel G Mathew’s tech blog. Joel's personal blog is the Eyrie, hosted here.