.htaccess 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. # Check that your Apache virtualhost have this settings:
  2. #<Directory "/var/www/chamilo-classic">
  3. # AllowOverride All
  4. # Order allow,deny
  5. # Allow from all
  6. #</Directory>
  7. RewriteEngine on
  8. RewriteCond %{QUERY_STRING} ^id=(.*)$
  9. # http://my.chamilo.net/certificates/?id=123 to http://my.chamilo.net/certificates/index.php?id=123
  10. RewriteRule ^certificates/$ certificates/index.php?id=%1 [L]
  11. # http://my.chamilo.net/jdoe to http://my.chamilo.net/user.php?jdoe
  12. RewriteRule ^([^/.]+)/?$ user.php?$1 [L]
  13. # Course redirection
  14. RewriteRule ^courses/([^/]+)/?$ main/course_home/course_home.php?cDir=$1 [QSA,L]
  15. RewriteRule ^courses/([^/]+)/index.php$ main/course_home/course_home.php?cDir=$1 [QSA,L]
  16. # Rewrite everything in the scorm folder of a course to the download script
  17. RewriteRule ^courses/([^/]+)/scorm/(.*)$ main/document/download_scorm.php?doc_url=/$2&cDir=$1 [QSA,L]
  18. # Rewrite everything in the document folder of a course to the download script
  19. RewriteRule ^courses/([^/]+)/document/(.*)$ main/document/download.php?doc_url=/$2&cDir=$1 [QSA,L]
  20. # Rewrite everything in the work folder
  21. RewriteRule ^courses/([^/]+)/work/(.*)$ main/work/download.php?file=work/$2&cDir=$1 [QSA,L]
  22. # Course upload files
  23. RewriteRule ^courses/([^/]+)/upload/(.*)$ app/courses/$1/upload/$2 [QSA,L]
  24. RewriteRule ^courses/([^/]+)/(.*)$ app/courses/$1/$2 [QSA,L]
  25. RewriteRule ^courses/([^/]+)/course-pic85x85.png$ app/courses/$1/course-pic85x85.png [QSA,L]
  26. RewriteRule ^courses/([^/]+)/course-pic.png$ app/courses/$1/course-pic.png [QSA,L]
  27. # About session
  28. RewriteRule ^session/(\d{1,})/about/?$ main/session/about.php?session_id=$1 [L]
  29. # Issued badges friendly URL
  30. RewriteRule ^badge/(\d{1,})/user/(\d{1,}) main/badge/issued.php?skill=$1&user=$2 [L]
  31. # Deny access
  32. RewriteRule ^(tests|.git) - [F,L,NC]