Fix .htaccess rule + update installation guide #2707

pull/2818/head
Angel Fernando Quiroz Campos 6 years ago
parent f15cb31288
commit 6ed802b07f
  1. 2
      .htaccess
  2. 12
      documentation/installation_guide.html
  3. 11
      documentation/installation_guide_es_ES.html
  4. 28
      documentation/installation_guide_fr_FR.html

@ -33,6 +33,8 @@ RewriteRule ^courses/([^/]+)/document/certificates/(.*)$ app/courses/$1/document
#RewriteRule ^courses/([^/]+)/document/(.*)$ main/document/download.php?doc_url=/$2&cDir=$1 [QSA,L] #RewriteRule ^courses/([^/]+)/document/(.*)$ main/document/download.php?doc_url=/$2&cDir=$1 [QSA,L]
RewriteRule ^courses/([^/]+)/document/(.*)$ public/courses.php?courseCode=$1&url=$2 [L,NC] RewriteRule ^courses/([^/]+)/document/(.*)$ public/courses.php?courseCode=$1&url=$2 [L,NC]
# Optimize load of custom per-course icons in courses (avoid download_uploaded_files.php)
RewriteRule ^courses/([^/]+)/upload/course_home_icons/(.*([\.js|\.css|\.png|\.jpg|\.jpeg|\.gif]))$ app/courses/$1/upload/course_home_icons/$2 [QSA,L]
# Course upload files # Course upload files
RewriteRule ^courses/([^/]+)/upload/([^/]+)/(.*)$ main/document/download_uploaded_files.php?code=$1&type=$2&file=$3 [QSA,L] RewriteRule ^courses/([^/]+)/upload/([^/]+)/(.*)$ main/document/download_uploaded_files.php?code=$1&type=$2&file=$3 [QSA,L]

@ -720,23 +720,25 @@ If you have issues with files taking a long time to download, make sure you reco
RewriteRule ^certificates/$ certificates/index.php?id=%1 [L] RewriteRule ^certificates/$ certificates/index.php?id=%1 [L]
RewriteRule ^courses/([^/]+)/?$ main/course_home/course_home.php?cDir=$1 [QSA,L] RewriteRule ^courses/([^/]+)/?$ main/course_home/course_home.php?cDir=$1 [QSA,L]
RewriteRule ^courses/([^/]+)/index.php$ main/course_home/course_home.php?cDir=$1 [QSA,L] RewriteRule ^courses/([^/]+)/index.php$ main/course_home/course_home.php?cDir=$1 [QSA,L]
RewriteRule ^courses/([^/]+)/scorm/(.*([\.js|\.css|\.png|\.jpg|\.jpeg|\.gif]))$ app/courses/$1/scorm/$2 [QSA,L]
RewriteRule ^courses/([^/]+)/scorm/(.*)$ main/document/download_scorm.php?doc_url=/$2&cDir=$1 [QSA,L] RewriteRule ^courses/([^/]+)/scorm/(.*)$ main/document/download_scorm.php?doc_url=/$2&cDir=$1 [QSA,L]
RewriteRule ^courses/([^/]+)/document/certificates/(.*)$ app/courses/$1/document/certificates/$2 [QSA,L] RewriteRule ^courses/([^/]+)/document/certificates/(.*)$ app/courses/$1/document/certificates/$2 [QSA,L]
RewriteRule ^courses/([^/]+)/document/(.*)$ main/document/download.php?doc_url=/$2&cDir=$1 [QSA,L] RewriteRule ^courses/([^/]+)/document/(.*)$ main/document/download.php?doc_url=/$2&cDir=$1 [QSA,L]
RewriteRule ^courses/([^/]+)/upload/course_home_icons/(.*([\.js|\.css|\.png|\.jpg|\.jpeg|\.gif]))$ app/courses/$1/upload/course_home_icons/$2 [QSA,L]
RewriteRule ^courses/([^/]+)/upload/([^/]+)/(.*)$ main/document/download_uploaded_files.php?code=$1&type=$2&file=$3 [QSA,L] RewriteRule ^courses/([^/]+)/upload/([^/]+)/(.*)$ main/document/download_uploaded_files.php?code=$1&type=$2&file=$3 [QSA,L]
RewriteRule ^courses/([^/]+)/work/(.*)$ main/work/download.php?file=work/$2&cDir=$1 [QSA,L] RewriteRule ^courses/([^/]+)/work/(.*)$ main/work/download.php?file=work/$2&cDir=$1 [QSA,L]
RewriteRule ^courses/([^/]+)/course-pic85x85.png$ main/inc/ajax/course.ajax.php?a=get_course_image&code=$1&image=course_image_source [QSA,L] RewriteRule ^courses/([^/]+)/course-pic85x85.png$ main/inc/ajax/course.ajax.php?a=get_course_image&code=$1&image=course_image_source [QSA,L]
RewriteRule ^courses/([^/]+)/course-pic.png$ main/inc/ajax/course.ajax.php?a=get_course_image&code=$1&image=course_image_large_source [QSA,L] RewriteRule ^courses/([^/]+)/course-pic.png$ main/inc/ajax/course.ajax.php?a=get_course_image&code=$1&image=course_image_large_source [QSA,L]
RewriteRule ^courses/([^/]+)/(.*)$ app/courses/$1/$2 [QSA,L] RewriteRule ^courses/([^/]+)/(.*)$ app/courses/$1/$2 [QSA,L]
RewriteRule ^session/(\d{1,})/about/?$ main/session/about.php?session_id=$1 [L] RewriteRule ^session/(\d{1,})/about/?$ main/session/about.php?session_id=$1 [L]
RewriteRule ^course/(\d{1,})/about/?$ main/course_info/about.php?course_id=$1 [L]
RewriteRule ^badge/(\d{1,}) main/badge/issued.php?issue=$1 [L] RewriteRule ^badge/(\d{1,}) main/badge/issued.php?issue=$1 [L]
RewriteRule ^skill/(\d{1,})/user/(\d{1,}) main/badge/issued.php?skill=$1&user=$2 [L] RewriteRule ^skill/(\d{1,})/user/(\d{1,}) main/badge/issued_all.php?skill=$1&user=$2 [L]
RewriteRule ^badge/(\d{1,})/user/(\d{1,}) main/badge/issued.php?skill=$1&user=$2 [L] RewriteRule ^badge/(\d{1,})/user/(\d{1,}) main/badge/issued_all.php?skill=$1&user=$2 [L]
RewriteRule ^main/exercice/(.*)$ main/exercise/$1 [QSA,L] RewriteRule ^main/exercice/(.*)$ main/exercise/$1 [QSA,L]
RewriteRule ^main/newscorm/(.*)$ main/lp/$1 [QSA,L] RewriteRule ^main/newscorm/(.*)$ main/lp/$1 [QSA,L]
RewriteRule ^main/upload/users/(.*)/(.*)/my_files/(.*)$ app/upload/users/$1/$2/my_files/$3 [QSA,L] RewriteRule ^service/(\d{1,})$ plugin/buycourses/src/service_information.php?service_id=$1 [L]
RewriteRule ^main/admin/$ main/admin/index.php [QSA,L] RewriteRule ^lti/os$ plugin/ims_lti/outcome_service.php [L]
RewriteRule ^service/(\d+)$ plugin/buycourses/src/service_information.php?service_id=$1 [L]
RewriteRule ^([^/.]+)/?$ user.php?$1 [L] RewriteRule ^([^/.]+)/?$ user.php?$1 [L]
RewriteRule ^(tests|.git) - [F,L,NC] RewriteRule ^(tests|.git) - [F,L,NC]
</Directory> </Directory>

@ -865,20 +865,21 @@ servidor web y agregar esta línea. Debería ver una diferencia notable en el ti
RewriteRule ^courses/([^/]+)/scorm/(.*)$ main/document/download_scorm.php?doc_url=/$2&cDir=$1 [QSA,L] RewriteRule ^courses/([^/]+)/scorm/(.*)$ main/document/download_scorm.php?doc_url=/$2&cDir=$1 [QSA,L]
RewriteRule ^courses/([^/]+)/document/certificates/(.*)$ app/courses/$1/document/certificates/$2 [QSA,L] RewriteRule ^courses/([^/]+)/document/certificates/(.*)$ app/courses/$1/document/certificates/$2 [QSA,L]
RewriteRule ^courses/([^/]+)/document/(.*)$ main/document/download.php?doc_url=/$2&cDir=$1 [QSA,L] RewriteRule ^courses/([^/]+)/document/(.*)$ main/document/download.php?doc_url=/$2&cDir=$1 [QSA,L]
RewriteRule ^courses/([^/]+)/upload/course_home_icons/(.*([\.js|\.css|\.png|\.jpg|\.jpeg|\.gif]))$ app/courses/$1/upload/course_home_icons/$2 [QSA,L]
RewriteRule ^courses/([^/]+)/upload/([^/]+)/(.*)$ main/document/download_uploaded_files.php?code=$1&type=$2&file=$3 [QSA,L] RewriteRule ^courses/([^/]+)/upload/([^/]+)/(.*)$ main/document/download_uploaded_files.php?code=$1&type=$2&file=$3 [QSA,L]
RewriteRule ^courses/([^/]+)/work/(.*)$ main/work/download.php?file=work/$2&cDir=$1 [QSA,L] RewriteRule ^courses/([^/]+)/work/(.*)$ main/work/download.php?file=work/$2&cDir=$1 [QSA,L]
RewriteRule ^courses/([^/]+)/course-pic85x85.png$ main/inc/ajax/course.ajax.php?a=get_course_image&code=$1&image=course_image_source [QSA,L] RewriteRule ^courses/([^/]+)/course-pic85x85.png$ main/inc/ajax/course.ajax.php?a=get_course_image&code=$1&image=course_image_source [QSA,L]
RewriteRule ^courses/([^/]+)/course-pic.png$ main/inc/ajax/course.ajax.php?a=get_course_image&code=$1&image=course_image_large_source [QSA,L] RewriteRule ^courses/([^/]+)/course-pic.png$ main/inc/ajax/course.ajax.php?a=get_course_image&code=$1&image=course_image_large_source [QSA,L]
RewriteRule ^courses/([^/]+)/(.*)$ app/courses/$1/$2 [QSA,L] RewriteRule ^courses/([^/]+)/(.*)$ app/courses/$1/$2 [QSA,L]
RewriteRule ^session/(\d{1,})/about/?$ main/session/about.php?session_id=$1 [L] RewriteRule ^session/(\d{1,})/about/?$ main/session/about.php?session_id=$1 [L]
RewriteRule ^course/(\d{1,})/about/?$ main/course_info/about.php?course_id=$1 [L]
RewriteRule ^badge/(\d{1,}) main/badge/issued.php?issue=$1 [L] RewriteRule ^badge/(\d{1,}) main/badge/issued.php?issue=$1 [L]
RewriteRule ^skill/(\d{1,})/user/(\d{1,}) main/badge/issued.php?skill=$1&user=$2 [L] RewriteRule ^skill/(\d{1,})/user/(\d{1,}) main/badge/issued_all.php?skill=$1&user=$2 [L]
RewriteRule ^badge/(\d{1,})/user/(\d{1,}) main/badge/issued.php?skill=$1&user=$2 [L] RewriteRule ^badge/(\d{1,})/user/(\d{1,}) main/badge/issued_all.php?skill=$1&user=$2 [L]
RewriteRule ^main/exercice/(.*)$ main/exercise/$1 [QSA,L] RewriteRule ^main/exercice/(.*)$ main/exercise/$1 [QSA,L]
RewriteRule ^main/newscorm/(.*)$ main/lp/$1 [QSA,L] RewriteRule ^main/newscorm/(.*)$ main/lp/$1 [QSA,L]
RewriteRule ^main/upload/users/(.*)/(.*)/my_files/(.*)$ app/upload/users/$1/$2/my_files/$3 [QSA,L] RewriteRule ^service/(\d{1,})$ plugin/buycourses/src/service_information.php?service_id=$1 [L]
RewriteRule ^main/admin/$ main/admin/index.php [QSA,L] RewriteRule ^lti/os$ plugin/ims_lti/outcome_service.php [L]
RewriteRule ^service/(\d+)$ plugin/buycourses/src/service_information.php?service_id=$1 [L]
RewriteRule ^([^/.]+)/?$ user.php?$1 [L] RewriteRule ^([^/.]+)/?$ user.php?$1 [L]
RewriteRule ^(tests|.git) - [F,L,NC] RewriteRule ^(tests|.git) - [F,L,NC]
</Directory> </Directory>

@ -771,24 +771,30 @@ ou, si vous travaillez avec Apache 2.4, la syntaxe est légèrement différente
<Directory "/var/www/chamilo"> <Directory "/var/www/chamilo">
RewriteEngine On RewriteEngine On
RewriteCond %{QUERY_STRING} ^id=(.*)$ RewriteCond %{QUERY_STRING} ^id=(.*)$
RewriteRule ^([^/.]+)/?$ user.php?$1 [L]
RewriteRule ^certificates/$ certificates/index.php?id=%1 [L] RewriteRule ^certificates/$ certificates/index.php?id=%1 [L]
RewriteRule ^courses/([^/]+)/$ main/course_home/course_home.php?cDir=$1 [QSA,L] RewriteRule ^courses/([^/]+)/?$ main/course_home/course_home.php?cDir=$1 [QSA,L]
RewriteRule ^courses/([^/]+)/index.php$ main/course_home/course_home.php?cDir=$1 [QSA,L] RewriteRule ^courses/([^/]+)/index.php$ main/course_home/course_home.php?cDir=$1 [QSA,L]
RewriteRule ^courses/([^/]+)/scorm/(.*([\.js|\.css|\.png|\.jpg|\.jpeg|\.gif]))$ app/courses/$1/scorm/$2 [QSA,L]
RewriteRule ^courses/([^/]+)/scorm/(.*)$ main/document/download_scorm.php?doc_url=/$2&cDir=$1 [QSA,L]
RewriteRule ^courses/([^/]+)/document/certificates/(.*)$ app/courses/$1/document/certificates/$2 [QSA,L] RewriteRule ^courses/([^/]+)/document/certificates/(.*)$ app/courses/$1/document/certificates/$2 [QSA,L]
RewriteRule ^courses/([^/]+)/document/(.*)$ main/document/download.php?doc_url=/$2&cDir=$1 [QSA,L] RewriteRule ^courses/([^/]+)/document/(.*)$ main/document/download.php?doc_url=/$2&cDir=$1 [QSA,L]
RewriteRule ^courses/([^/]+)/scorm/(.*)$ main/document/download_scorm.php?doc_url=/$2&cDir=$1 [QSA,L] RewriteRule ^courses/([^/]+)/upload/course_home_icons/(.*([\.js|\.css|\.png|\.jpg|\.jpeg|\.gif]))$ app/courses/$1/upload/course_home_icons/$2 [QSA,L]
RewriteRule ^courses/([^/]+)/upload/([^/]+)/(.*)$ main/document/download_uploaded_files.php?code=$1&type=$2&file=$3 [QSA,L]
RewriteRule ^courses/([^/]+)/work/(.*)$ main/work/download.php?file=work/$2&cDir=$1 [QSA,L] RewriteRule ^courses/([^/]+)/work/(.*)$ main/work/download.php?file=work/$2&cDir=$1 [QSA,L]
RewriteRule ^courses/([^/]+)/upload/(.*)$ app/courses/$1/upload/$2 [QSA,L] RewriteRule ^courses/([^/]+)/course-pic85x85.png$ main/inc/ajax/course.ajax.php?a=get_course_image&code=$1&image=course_image_source [QSA,L]
RewriteRule ^courses/([^/]+)/course-pic85x85.png$ app/courses/$1/course-pic85x85.png [QSA,L] RewriteRule ^courses/([^/]+)/course-pic.png$ main/inc/ajax/course.ajax.php?a=get_course_image&code=$1&image=course_image_large_source [QSA,L]
RewriteRule ^courses/([^/]+)/course-pic.png$ app/courses/$1/course-pic.png [QSA,L] RewriteRule ^courses/([^/]+)/(.*)$ app/courses/$1/$2 [QSA,L]
RewriteRule ^main/upload/users/(.*)/(.*)/my_files/(.*)$ app/upload/users/$1/$2/my_files/$3 [QSA,L]
RewriteRule ^session/(\d{1,})/about/?$ main/session/about.php?session_id=$1 [L] RewriteRule ^session/(\d{1,})/about/?$ main/session/about.php?session_id=$1 [L]
RewriteRule ^badge/(\d{1,})/user/(\d{1,}) main/badge/issued.php?skill=$1&user=$2 [L] RewriteRule ^course/(\d{1,})/about/?$ main/course_info/about.php?course_id=$1 [L]
RewriteRule ^main/admin/$ main/admin/index.php [QSA,L] RewriteRule ^badge/(\d{1,}) main/badge/issued.php?issue=$1 [L]
RewriteRule ^main/exercice/(.+)$ main/exercise/$1 [QSA,L] RewriteRule ^skill/(\d{1,})/user/(\d{1,}) main/badge/issued_all.php?skill=$1&user=$2 [L]
RewriteRule ^badge/(\d{1,})/user/(\d{1,}) main/badge/issued_all.php?skill=$1&user=$2 [L]
RewriteRule ^main/exercice/(.*)$ main/exercise/$1 [QSA,L]
RewriteRule ^main/newscorm/(.*)$ main/lp/$1 [QSA,L] RewriteRule ^main/newscorm/(.*)$ main/lp/$1 [QSA,L]
RewriteRule ^courses/(.*)$ app/courses/$1 [QSA,L] RewriteRule ^service/(\d{1,})$ plugin/buycourses/src/service_information.php?service_id=$1 [L]
RewriteRule ^lti/os$ plugin/ims_lti/outcome_service.php [L]
RewriteRule ^([^/.]+)/?$ user.php?$1 [L]
RewriteRule ^(tests|.git) - [F,L,NC]
</Directory> </Directory>
</pre> </pre>
<h3>Nginx</h3> <h3>Nginx</h3>

Loading…
Cancel
Save