=1 ORDER BY sortid ASC LIMIT 1 ;"; $data = mysql_query( $q ); if( mysql_num_rows( $data )==0 ){ include_once( 'inc/404.php' ); exit; } else { $row = mysql_fetch_assoc( $data ); } if( $GLOBALS['mysql_persistent']!=1 ){ mysql_close(); } //die( $row['url'] ); header( 'Location: /' . $row['url'] ); exit; ?>