<?php
    $directory = $_SERVER["REQUEST_URI"];

    $quitar = str_replace(URL_HOST, '', "");

    $directory = str_replace($quitar, '', $directory);    
    $directory = filter_var($directory, FILTER_SANITIZE_URL);
    $directory = explode('/', $directory);
    $directory = array_filter($directory);

    $url['dir'] = strtolower(array_shift($directory));
    $url['args'] = $directory;
    $url['args'] = strtolower(array_shift($url['args']));

    $url["count"] = count(explode(URL_HOST,"/"));
    $slashes = $url["count"];
    // unset($directory);
?>