htaccess.dist 1013 B

123456789101112131415161718192021
  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. #rewrite base is the dir dokeos is installed in with trailing slash
  9. RewriteBase {DOKEOS_URL_APPEND_PATH}/courses/
  10. #do not rewrite on the main dir
  11. #change this path to the path of your main folder
  12. RewriteCond %{REQUEST_URI} !^{DOKEOS_URL_APPEND_PATH}/main/
  13. #replace nasty ampersands by 3 slashes, we change these back in download.php
  14. RewriteRule ([^/]+)/document/(.*)&(.*)$ $1/document/$2///$3 [N]
  15. #rewrite everything in the document folder of a course to the download script
  16. RewriteRule ([^/]+)/document/(.*)$ {DOKEOS_URL_APPEND_PATH}/main/document/download.php?doc_url=/$2&cDir=$1 [QSA,L]
  17. </IfModule>