Fix /@username page routing

This commit is contained in:
Niko 2022-02-11 00:10:14 +01:00
parent c396898925
commit 390cffbed2
1 changed files with 10 additions and 10 deletions

View File

@ -33,6 +33,16 @@ function module($ns, $die = false) {
}
# /@username
if (preg_match('/^\/\@[a-zA-Z0-9\-\_]+/', $uri))
{
if ($_SERVER['HTTP_ACCEPT'] === 'application/activity+json')
redirect( substr($uri, 2) );
module('public.profile', true);
}
################
# module ROUTING
@ -50,13 +60,3 @@ foreach ($routes_config as $rcfg) {
module($module, true);
}
}
# /@username
if (preg_match('/^\/\@[a-zA-Z0-9\-\_]+/', $uri))
{
if ($_SERVER['HTTP_ACCEPT'] === 'application/activity+json')
redirect( substr($uri, 2) );
req_pub('profile');
}