Redirect /manual/ to latest manual version

This commit is contained in:
Alex Cabal 2020-03-20 11:37:55 -05:00
parent 56aaab7152
commit 7b2d01a9c5

12
www/manual/index.php Normal file
View file

@ -0,0 +1,12 @@
<?
require_once('Core.php');
// Redirect to the latest version of the manual
$dirs = glob(MANUAL_PATH . '/*', GLOB_ONLYDIR);
sort($dirs);
$currentManual = str_replace(WEB_ROOT, '', $dirs[sizeof($dirs) - 1]);
http_response_code(302);
header('Location: ' . $currentManual);