1 && $pages[ count( $pages ) - 1 ] == '' ) { $args = ( count( $parts ) > 1 ? '?' . $parts[ 1 ] : '' ); header( $_SERVER[ 'SERVER_PROTOCOL' ] . ' 301 Moved Permanently' ); header( 'Location: /' . rtrim( $urlA, '/' ) . $args ); exit(); } if ( $pages[ 0 ] == 'api' && isset( $pages[ 1 ] ) && preg_match( '#^([a-z]+)$#', $pages[ 1 ], $api1 ) && isset( $pages[ 2 ] ) && preg_match( '#^([a-z-]+)$#', $pages[ 2 ], $api2 ) ) { new APIRouter( $api1[ 0 ], $api2[ 0 ] ); } else if ( preg_match( '#^fitness.sanchez-mathieu\.test$#', $_SERVER[ 'SERVER_NAME' ] ) || preg_match( '#^fitness.sanchez-mathieu\.fr$#', $_SERVER[ 'SERVER_NAME' ] ) || preg_match( '#^cauweb\.fr$#', $_SERVER[ 'SERVER_NAME' ] )) { new SiteRouter( $pages ); } else { new Error( 404 ); } /* } elseif (preg_match('#^(www\.)?mvc\.eldotravo\.dev$#', $_SERVER['SERVER_NAME'])) { new SiteRouter($pages); */ ?>