.htaccess 1.3 KB

12345678910111213141516171819202122232425262728293031
  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. RewriteCond %{QUERY_STRING} ^id_session=(.*)$
  15. RewriteRule ^courses/([^/]+)/index.php$ main/course_home/course_home.php?cidReq=$1&id_session=%1 [L]
  16. RewriteRule ^courses/([^/]+)/$ main/course_home/course_home.php?cidReq=$1&id_session=%1 [L]
  17. RewriteRule ^courses/([^/]+)/index.php$ main/course_home/course_home.php?cidReq=$1 [L]
  18. # Rewrite everything in the scorm folder of a course to the download script
  19. RewriteRule ^courses/([^/]+)/scorm/(.*)$ main/document/download_scorm.php?doc_url=/$2&cDir=$1 [QSA,L]
  20. # Rewrite everything in the document folder of a course to the download script
  21. RewriteRule ^courses/([^/]+)/document/(.*)$ main/document/download.php?doc_url=/$2&cDir=$1 [QSA,L]
  22. # Rewrite everything in the work folder
  23. RewriteRule ^courses/([^/]+)/work/(.*)$ main/work/download.php?file=work/$2&cDir=$1 [QSA,L]