Selaa lähdekoodia

Add SCORM optimization for content with lots of JS/CSS by allowing direct access to JS and CSS files only

Yannick Warnier 6 vuotta sitten
vanhempi
commit
859bd5de08
1 muutettua tiedostoa jossa 2 lisäystä ja 0 poistoa
  1. 2 0
      .htaccess

+ 2 - 0
.htaccess

@@ -23,6 +23,8 @@ RewriteRule ^courses/([^/]+)/?$ main/course_home/course_home.php?cDir=$1 [QSA,L]
 RewriteRule ^courses/([^/]+)/index.php$ main/course_home/course_home.php?cDir=$1 [QSA,L]
 
 # Rewrite everything in the scorm folder of a course to the download script
+# except JS and CSS files, which can be served directly
+RewriteRule ^courses/([^/]+)/scorm/(.*([\.js|\.css]))$ app/courses/$1/scorm/$2 [QSA,L]
 RewriteRule ^courses/([^/]+)/scorm/(.*)$ main/document/download_scorm.php?doc_url=/$2&cDir=$1 [QSA,L]
 
 # Rewrite everything in the document folder of a course to the download script