.htaccess 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  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]