diff --git a/lib/weblib.php b/lib/weblib.php
index <HASH>..<HASH> 100644
--- a/lib/weblib.php
+++ b/lib/weblib.php
@@ -3785,7 +3785,7 @@ function page_id_and_class(&$getid, &$getclass) {
         if (substr($path, -1) == '/') {
             $path .= 'index';
         }
-        if (empty($path) || $path == '/index') {
+        if (empty($path) || $path == 'index') {
             $id    = 'site-index';
             $class = 'course';
         } else {
Fix for bug <I>.

Credits for the report and the patch go to Samuli Karevaara.