Skip to content

Commit

Permalink
Fix conflict with RewriteRule for user.php - refs BT#12242
Browse files Browse the repository at this point in the history
  • Loading branch information
AngelFQC committed Feb 28, 2017
1 parent 1b0c1c8 commit 0b2d088
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions .htaccess
Expand Up @@ -7,14 +7,11 @@
#</Directory>

RewriteEngine on
RewriteCond %{QUERY_STRING} ^id=(.*)$

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

# http://my.chamilo.net/jdoe to http://my.chamilo.net/user.php?jdoe
RewriteRule ^([^/.]+)/?$ user.php?$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]
Expand Down Expand Up @@ -58,5 +55,9 @@ 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]

0 comments on commit 0b2d088

Please sign in to comment.