-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy path.htaccess
executable file
·27 lines (27 loc) · 1.32 KB
/
.htaccess
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
RewriteEngine On
RewriteRule ^images/(.+)$ images/$1 [L]
RewriteRule ^fonts/(.+)$ fonts/$1 [L]
RewriteRule ^favicon/(.+)$ favicon/$1 [L]
RewriteRule ^js/(.+)$ js/$1 [L]
RewriteRule ^css/(.+)$ css/$1 [L]
RewriteRule ^controller/(.+)$ controller/$1 [L]
RewriteRule ^lib/(.+)$ lib/$1 [L]
RewriteRule ^model/(.+)$ model/$1 [L]
RewriteRule ^view/(.+)$ view/$1 [L]
RewriteRule ^api/(.+)$ api/$1 [L]
RewriteRule ^ide/(.+)$ ide/$1 [L]
RewriteRule ^src/(.+)$ ide/src/$1 [L]
RewriteRule ^uploads/(.+)$ uploads/$1 [L]
RewriteRule ^problem/src/(.+)$ /ide/src/$1 [L]
RewriteRule ^problem/demo/(.+)$ /ide/demo/$1 [L]
RewriteCond %{QUERY_STRING} ^username=(\w+)&forgot_token=(.+)$
RewriteRule ^user/?$ /index.php?controller=user&function=forgot_verify&username=%1&forgot_token=%2 [L]
RewriteCond %{QUERY_STRING} ^p_id=(\d+)$
RewriteRule ^problem/?$ /index.php?controller=problem&function=fetch_problem&p_id=%1 [L]
RewriteCond %{QUERY_STRING} ^c_id=(\d+)$
RewriteRule ^contest/?$ /index.php?controller=contest&function=fetch_contest&c_id=%1 [L]
RewriteCond %{QUERY_STRING} ^asg_id=(\d+)$
RewriteRule ^asg/?$ /index.php?controller=asg&function=fetch_asg&asg_id=%1 [L]
RewriteCond %{QUERY_STRING} ^c_id=(\d+)$
RewriteRule ^ranklist/?$ /index.php?controller=contest&function=fetch_ranklist&c_id=%1 [L]
RewriteRule ^(.*)/(.*)$ /index.php?controller=$1&function=$2 [L]