I get part of the url after the slash
if (!preg_match('/^([0-9]+)/i', $url, $url_params)) { header("HTTP/1.0 404 Not Found"); } This option works if the URL has numeric values, for example, site.ru/123456/789
What to replace ([0-9]+) to get a part of the letter url, for example, site.ru/ qwer -dhfjf-dbjs?
You only need to get qwer
Thank!
\w+. - entithat^with\/, then it will look for a match not from the beginning of the line, but from\/- entithat