From 0b2d088c9bcfec8d74c2d5e974330ee8b9ce4870 Mon Sep 17 00:00:00 2001 From: Angel Fernando Quiroz Campos Date: Tue, 28 Feb 2017 11:14:42 -0500 Subject: [PATCH] Fix conflict with RewriteRule for user.php - refs BT#12242 --- .htaccess | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.htaccess b/.htaccess index 166fd6233fd..ad2bcce53d1 100644 --- a/.htaccess +++ b/.htaccess @@ -7,14 +7,11 @@ # 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] @@ -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]