htaccess.dist 1.0 KB

12345678910111213141516171819202122
  1. ###########################################################################################
  2. #change this file to fit your configuration and save it as .htaccess in the courses folder#
  3. ###########################################################################################
  4. #dokeos mod rewrite
  5. #comment lines start with # and are not processed
  6. <IfModule mod_rewrite.c>
  7. RewriteEngine On
  8. Options +FollowSymlinks
  9. #rewrite base is the dir dokeos is installed in with trailing slash
  10. RewriteBase {DOKEOS_URL_APPEND_PATH}/courses/
  11. #do not rewrite on the main dir
  12. #change this path to the path of your main folder
  13. RewriteCond %{REQUEST_URI} !^'.$urlAppendPath.'/main/
  14. #replace nasty ampersands by 3 slashes, we change these back in download.php
  15. RewriteRule ([^/]+)/document/(.*)&(.*)$ $1/document/$2///$3 [N]
  16. #rewrite everything in the document folder of a course to the download script
  17. RewriteRule ([^/]+)/document/(.*)$ {DOKEOS_URL_APPEND_PATH}/main/document/download.php?doc_url=/$2&cDir=$1 [QSA,L]
  18. </IfModule>