WordPress behind a reverse proxy. Your public domain of the WordPress site is your.example.com/blog and the actual server URL (where WordPress lives is server123.hostingcompany.com/~accountname
Using the following plugin as mu-plugin: https://raw.github.com/mistermarco/wp_reverse_proxy/master/su_reverse_proxy.php
- WordPress URI: In the database all the URIs including home_url and site_url point to the public domain like your.example.com/blog
- Reverse Proxy: Needs to send you the $_SERVER['HTTP_X_FORWARDED_HOST'] in order to work.
- .htaccess: WordPress will eventually try to overwrite the htaccess file for you when saving new permalinks, please block this.