1 2 3 4 5 6 7 8 9 10 | session_start(); if (! empty ( $_GET [ 'admin' ])) { $_SESSION [ 'admin' ] = $_GET [ 'admin' ]; } if ( $_SESSION [ 'admin' ] != "yes" ) { $url_array = explode ( '/' , $_SERVER [ 'REQUEST_URI' ]); if ( $url_array [1] == "partnership" || $url_array [1] == "partnerships" ) { header( "Location: http://www.xxxxx.com/partnerships/" ); die (); } else { header( "Location: http://www.xxxxxx.com/real-estate-services/" ); die (); } } |