I got my local setup working under 127.0.0.1:91/blog
. In order to overwrite my server default domain I added locally this to my wp-config.php
file:
define('WP_HOME','http://127.0.0.1:91/blog'); define('WP_SITEURL','http://127.0.0.1:91/blog'); define('FORCE_SSL_LOGIN',false); define('FORCE_SSL_ADMIN',false);
In my Fiddler Web Debugger script I am using this to redirect my browser request to my domain name, to instead go to my local setup:
if (oSession.HostnameIs("my.domain.name")){ oSession.bypassGateway = true; if (oSession.HTTPMethodIs("CONNECT")){ oSession["x-replywithtunnel"] = "FakeTunnel"; return; } oSession["x-overrideHost"] = "127.0.0.1:91"; oSession.fullUrl = "http://127.0.0.1:91" + oSession.PathAndQuery; }
How can I get WordPress returned page to be rewritten before it gets sent do the browser from 127.0.0.1:91
to my.domain.name
; and from http://
to https://
? Or is there a smarter way to go about all of this within WordPress?
I tried this in my Fiddler Script but it is not working:
if oSession.oResponse.headers.ExistsAndContains("Content-Type","text/html")){ oSession.utilDecodeResponse(); oSession.utilReplaceInResponse('http://','https://'); oSession.utilReplaceInResponse('127.0.0.1:91','my.domain.name'); }
I suppose I could setup an Apache proxy rewrite for the pages that get returned, but I am not sure how to go about this.