You can not select more than 25 topics
			Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
		
		
		
		
		
			
		
			
				
					
					
						
							63 lines
						
					
					
						
							2.8 KiB
						
					
					
				
			
		
		
	
	
							63 lines
						
					
					
						
							2.8 KiB
						
					
					
				# Check that your Apache virtualhost have this settings:
 | 
						|
 | 
						|
#<Directory "/var/www/chamilo-classic">
 | 
						|
#  AllowOverride All
 | 
						|
#  Order allow,deny
 | 
						|
#  Allow from all
 | 
						|
#</Directory>
 | 
						|
 | 
						|
RewriteEngine on
 | 
						|
 | 
						|
# http://my.chamilo.net/certificates/?id=123 to http://my.chamilo.net/certificates/index.php?id=123
 | 
						|
RewriteCond %{QUERY_STRING} ^id=(.*)$
 | 
						|
RewriteRule ^certificates/$ certificates/index.php?id=%1 [L]
 | 
						|
 | 
						|
# Course redirection
 | 
						|
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]
 | 
						|
 | 
						|
# Rewrite everything in the scorm folder of a course to the download script
 | 
						|
RewriteRule ^courses/([^/]+)/scorm/(.*)$ main/document/download_scorm.php?doc_url=/$2&cDir=$1 [QSA,L]
 | 
						|
 | 
						|
# Rewrite everything in the document folder of a course to the download script
 | 
						|
# Except certificate resources, which might need to be accessible publicly to all
 | 
						|
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]
 | 
						|
 | 
						|
# Course upload files
 | 
						|
RewriteRule ^courses/([^/]+)/upload/([^/]+)/(.*)$ main/document/download_uploaded_files.php?code=$1&type=$2&file=$3 [QSA,L]
 | 
						|
 | 
						|
# Rewrite everything in the work folder
 | 
						|
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-pic.png$ main/inc/ajax/course.ajax.php?a=get_course_image&code=$1&image=course_image_large_source [QSA,L]
 | 
						|
 | 
						|
# Redirect all courses/ to app/courses/
 | 
						|
RewriteRule ^courses/([^/]+)/(.*)$ app/courses/$1/$2 [QSA,L]
 | 
						|
 | 
						|
# About session
 | 
						|
RewriteRule ^session/(\d{1,})/about/?$ main/session/about.php?session_id=$1 [L]
 | 
						|
 | 
						|
# Issued individual badge friendly URL
 | 
						|
RewriteRule ^badge/(\d{1,}) main/badge/issued.php?issue=$1 [L]
 | 
						|
 | 
						|
# Issued badges friendly URL
 | 
						|
RewriteRule ^skill/(\d{1,})/user/(\d{1,}) main/badge/issued_all.php?skill=$1&user=$2 [L]
 | 
						|
# Support deprecated URL (avoid 404)
 | 
						|
RewriteRule ^badge/(\d{1,})/user/(\d{1,}) main/badge/issued_all.php?skill=$1&user=$2 [L]
 | 
						|
 | 
						|
# Support old URLs using the exercice (with a c) folder rather than exercise
 | 
						|
RewriteRule ^main/exercice/(.*)$ main/exercise/$1 [QSA,L]
 | 
						|
# Support old URLs using the newscorm folder rather than lp
 | 
						|
RewriteRule ^main/newscorm/(.*)$ main/lp/$1 [QSA,L]
 | 
						|
 | 
						|
# service Information
 | 
						|
RewriteRule ^service/(\d{1,})$ plugin/buycourses/src/service_information.php?service_id=$1 [L]
 | 
						|
 | 
						|
# This rule is very generic and should always remain at the bottom of .htaccess
 | 
						|
# http://my.chamilo.net/jdoe to http://my.chamilo.net/user.php?jdoe
 | 
						|
RewriteRule ^([^/.]+)/?$ user.php?$1 [L]
 | 
						|
 | 
						|
# Deny access
 | 
						|
RewriteRule ^(tests|.git) - [F,L,NC]
 | 
						|
 |