Skip to content

Instantly share code, notes, and snippets.

@IronGhost63
Last active May 29, 2020 10:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save IronGhost63/ac497d818dcb5bf7a5eff702e7374e4b to your computer and use it in GitHub Desktop.
Save IronGhost63/ac497d818dcb5bf7a5eff702e7374e4b to your computer and use it in GitHub Desktop.
hook init
<?php
add_action( 'init', function() {
// Header will contains HTTP_TRUE_CLIENT_IP if accessing via Akamai
if( isset( $_SERVER['HTTP_TRUE_CLIENT_IP'] ) ) {
ob_start( function( $output ) {
return str_replace( 'wpengineurl.com', 'realdomain.com/sub' $output );
} );
}
} );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment