-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.htaccess
executable file
·55 lines (33 loc) · 2.51 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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
#------------------------------------------------------------------------------------------
# Parse URL of social object repository
#------------------------------------------------------------------------------------------
# Parse all repository requests (the syntax of request is given below in the @syntax line
# and calls core/RepositoryServerController with the following arguments
# protocol : String
# repname : String
# type ::= Repository|Perspective|ClassFragment|Attribute|InstranceFragment
# perspective_id : String [0..1]
# class_fragment_id : String [0..1]
# attribute_id : String [0..1]
# soid : String [0..1]
# + some other parameters (@TODO)
RewriteEngine On
#=== Repository ========================================================
# @syntax /<repositoryspec>
RewriteRule ^(([a-z0-9]+)\$)?([a-z0-9_]+)/?$ core/RepositoryServerController.php\?protocol=$2&repname=$3&type=Repository [L,QSA]
#=== Perspective =======================================================
# @syntax /<repositoryspec>/Perspective
RewriteRule ^(([a-z0-9]+)\$)?([a-z0-9_]+)/Perspective/?$ core/RepositoryServerController.php\?protocol=$2&repname=$3&type=Perspective [L,QSA]
# @syntax /<repositoryspec>/Perspective/<perspectivesoid>
RewriteRule ^(([a-z0-9]+)\$)?([a-z0-9_]+)/Perspective/([^/]+)/?$ core/RepositoryServerController.php\?protocol=$2&repname=$3&type=Perspective&perspective_id=$4 [L,QSA]
#=== ClassFragment =====================================================
# @syntax /<repositoryspec>/ClassFragment/<classfragmentsoid>
RewriteRule ^(([a-z0-9]+)\$)?([a-z0-9_]+)/ClassFragment/([^/]+)/?$ core/RepositoryServerController.php\?protocol=$2&repname=$3&type=ClassFragment&class_fragment_id=$4 [L,QSA]
#=== Attribute =========================================================
# @syntax /<repositoryspec>/Attribute/<attributesoid>
RewriteRule ^(([a-z0-9]+)\$)?([a-z0-9_]+)/Attribute/([^/]+)/?$ core/RepositoryServerController.php\?protocol=$2&repname=$3&type=Attribute&attribute_id=$4 [L,QSA]
#=== InstanceFragment =====================================================
# @syntax /<repositoryspec>/InstanceFragment?...
RewriteRule ^(([a-z0-9]+)\$)?([a-z0-9_]+)/InstanceFragment/?$ core/RepositoryServerController.php\?protocol=$2&repname=$3&type=InstanceFragment [L,QSA]
# /<repositoryspec>/InstanceFragment/<instancesoid>/<classfragmentsoid>
RewriteRule ^(([a-z0-9]+)\$)?([a-z0-9_]+)/InstanceFragment/([^/]*)/([^/]*)/?$ core/RepositoryServerController.php\?protocol=$2&repname=$3&type=InstanceFragment&soid=$4&class_fragment_id=$5 [L,QSA]