Last active
May 29, 2020 10:14
-
-
Save IronGhost63/ac497d818dcb5bf7a5eff702e7374e4b to your computer and use it in GitHub Desktop.
hook init
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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