Allow Daux to work from sub-directories

If you try to host Daux from any directory other than the root of a website (like mysite.com/docs, for example), it just gives an error that the page can't be found. This commit will make Daux remove the base directory from the request when handling it, which should make it work properly in sub-directories.
Cette révision appartient à :
Morgan Zolob 2018-06-19 17:00:13 -07:00 révisé par Stéphane Goetz
Parent 59a9dd5cf5
révision 7928b4365b

Voir le fichier

@ -142,7 +142,7 @@ class Server
{
$this->params = $this->getParams();
$request = substr($this->request->getRequestUri(), 1);
$request = substr($this->request->getRequestUri(), strlen($this->request->getBaseUrl()) + 1);
if (substr($request, 0, 7) == 'themes/') {
return $this->serveTheme(substr($request, 6));