htaccess.dist 1.2 KB

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