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.
39 lines
1.3 KiB
39 lines
1.3 KiB
<IfModule mod_rewrite.c>
|
|
Options -MultiViews
|
|
Options +FollowSymLinks
|
|
|
|
RewriteEngine On
|
|
RewriteBase /
|
|
|
|
# Courses home
|
|
RewriteCond %{QUERY_STRING} ^id_session=0
|
|
RewriteRule ^courses/(.*)/(.*)$ web/courses/$1? [R,L]
|
|
|
|
RewriteCond %{QUERY_STRING} ^id_session=([0-9]*)
|
|
RewriteRule ^courses/(.*)/(.*)$ web/courses/$1/%1/? [R,L]
|
|
|
|
RewriteRule ^courses/(.*)/index.php$ web/courses/$1? [R,L]
|
|
RewriteRule ^courses/(.*)/$ web/courses/$1? [R,L]
|
|
|
|
# Courses documents
|
|
# courses/MATHS/document/folder1/picture.jpg --> courses/MATHS/document/?file=folder1/picture.jpg
|
|
RewriteRule ^courses/(.*)/document/(.*)$ web/courses/$1/document/?file=$2 [R,L]
|
|
|
|
# Portal default_platform_document files
|
|
RewriteRule ^data/default_platform_document/(.*)$ web/data/default_platform_document/?file=$1 [R,L]
|
|
|
|
# Certificates
|
|
# certificates/index.php?id=123 --> web/certificates/123
|
|
RewriteCond %{QUERY_STRING} ^id=([0-9]*)
|
|
RewriteRule ^certificates/(.*)$ web/certificates/%1? [R,L]
|
|
|
|
# User profile
|
|
# user.php?jmontoya --> web/user/jmontoya
|
|
RewriteCond %{QUERY_STRING} ^([a-z0-9A-z]*)
|
|
RewriteRule ^user.php?$ web/user/%1? [R,L]
|
|
|
|
# Portal news
|
|
# news_list.php?id=5 --> web/news/5
|
|
RewriteCond %{QUERY_STRING} ^id=([0-9]*)
|
|
RewriteRule ^news_list.php?$ web/news/%1? [R,L]
|
|
</IfModule> |