Local domain remap with proxy : Infinite 301 redirect, bad URL typo

Found the problem / the solution: while using the proxy, the servers variable REQUEST_URI is not the same using FoxyProxy, server var ‘REQUEST_URI’ return the full url: $_SERVER[‘REQUEST_URI’] -> “hxxp://mydomain.com/theurl” using windows host file, server var ‘REQUEST_URI’ return just the end of the url: $_SERVER[‘REQUEST_URI’] -> “/theurl” so I added this to the wordpress index.php … Read more

Redefine REST API variables

So there are two moving parts at work: Domain which web server maps to WP installation Domain WP installation thinks it’s installed on Under normal circumstances these simply match. In your case you have two domains mapped to the installation. WP can only think about one domain at a time. At a time is important … Read more

Return raw image proxy for wordpress plugin

I circumvented the issue with the following hack of images.php. <?php // Import wordpress API. require_once(‘../../../wp-load.php’); function hinews_get_image($id) { if (array_key_exists(‘mimetype’, $_GET)) { $mimetype = $_GET[‘mimetype’]; } else { return ‘No MIME type specified.’; } $options = get_option(‘homeinfo_news_options’); $parm_token = ‘?access_token=’ . $options[‘token’]; $base_url=”https://myurl.com/”; $image_url = $base_url . $id . $parm_token; $image = file_get_contents($image_url); if … Read more

WordPress is not loading resources

You probably have to set your Site Settings to https:// instead of http:// either through the admin screen, or the wp-config.php. Failing to do so will cause WordPress to output the resources as non-secure, and your browser will reject them.