Skip to content

Instantly share code, notes, and snippets.

@JamesHusband
Created August 22, 2017 08:53
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 JamesHusband/7ce3519ffe71ff23fde5c922109022ee to your computer and use it in GitHub Desktop.
Save JamesHusband/7ce3519ffe71ff23fde5c922109022ee to your computer and use it in GitHub Desktop.
if( strpos( $_SERVER['REQUEST_URI'], 'reviews' ) !== false ) // Check if url contains 'reviews'
$uribits = explode("/",$_SERVER['REQUEST_URI']); 'explode uri'
$operator_slug = $uribits[3]; 'get operator name from exploded uri'
header('Location: http://www.superfreeslotgames.com/mobile/reviews'.$operator_slug.$subid_url ); // new redirect
} else {
header('Location: http://www.superfreeslotgames.com/mobile/'.$subid_url ); // default to standard redirect
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment