0
I use RewriteRule (.*) /index.php [QSA,L] and to manage the Urls use this code:
<?php
$url = ltrim( parse_url( $_SERVER['REQUEST_URI'] , PHP_URL_PATH ) , '/' );
$url = explode( '/' , $url );
if(count($url) == 1)
{
if(file_exists(DIR_PAGES.$url[0].'.php'))
{
    if($url[0] == 'home')
    {
        $pag = DIR_PAGES.'home.php';
    }
    else
    {
        $pag = DIR_PAGES.$url[0].'.php';
    }
}
else if(file_exists(DIR_PAGES.$url[0]) && $url[0] != '')
{
    header('Location: '.SITE_URL.substr($url[0], 0, -4));
}
else if($url[0] == '' || $url[0] == null)
{
    $pag = DIR_PAGES.'home.php';
}
else
{
    header('Location: '.SITE_URL);
}
}
else if(count($url) == 2)
{
if($url[0] == 'stream' || $url[0] == 'newstream')
{
    if($url[1] != '' || $url[1] != null)
    {
        if($url[0] == 'stream')
        {
            $pag = DIR_PAGES.'stream.php';
        }
        else
        {
            $pag = DIR_PAGES.'newstream.php';
        }
    }
    else
    {
        header('Location: '.SITE_URL);
    }
}
else
{
    header('Location: '.SITE_URL);
}
}
I’m using, but when I access site.com/newstream/someone Videojs ASS to work.
    videojs('player', {
    controls: true,
    nativeControlsForTouch: false,
    fluid: true,
    plugins: {
      ass: {
        'src': ["./vjs/002.ass"],
        'delay': 0
      }
    },
    sources: [{"type": "video/mp4", "src": "/files/video.mkv"}]
    });
						
And this Videojs ASS requests some file from the server?
– Woss
Do, from the caption file, tried with direct link
site.com/files/arquivo.assand with link from the root/var/www/site/files/arquivo.ass, but it didn’t work.– Lucas Caresia
Why are you directing all Urls to the
index.php. Try to add something likeRewriteCond %{REQUEST_URI} !\.(?:ass)$ [NC]in his.htaccessand see if anything changes.– Woss
Still not solved, how can I solve this by changing my . htaccess, even if I have to change it completely, I just want when someone accesses
site.com/stream/algumnome, I can get the valuealgumnomerunning the stream.php file– Lucas Caresia
@Andersoncarloswoss Remembering that I define the
srcVideojs on the same page and works perfectly.– Lucas Caresia
And how would that be? You can post the code?
– Woss
Okay, I already put the code in the question.
– Lucas Caresia
And if you don’t define the
srcon the same page, as Videojs knows which file to search for?– Woss
I don’t understand what you want to know with your question, could explain better ??
– Lucas Caresia
Let’s go continue this discussion in chat.
– Woss