-
Notifications
You must be signed in to change notification settings - Fork 0
/
.htaccess
75 lines (56 loc) · 2.25 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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
RewriteEngine on
RewriteRule ^/?$ /api/ [R]
RewriteRule ^api/?$ /index.php
#get infos sur un utilisateur
Header set Access-Control-Allow-Origin "*"
RewriteRule ^api/user/([0-9]+)/?$ /user.php?user=$1
#get objets d'un utilisateur
Header set Access-Control-Allow-Origin "*"
RewriteRule ^api/user/([0-9]+)/objets/?$ /user.php?user=$1&objets=1
#get infos sur un objet
Header set Access-Control-Allow-Origin "*"
RewriteRule ^api/objet/([0-9]+)/?$ /objet.php?action=info&objet=$1
#Delete object
Header set Access-Control-Allow-Origin "*"
RewriteRule ^api/objet/([0-9]+)/delete/?$ /objet.php?action=delete&objet=$1
#Insert object
Header set Access-Control-Allow-Origin "*"
RewriteCond %{REQUEST_METHOD} POST
RewriteRule ^api/objet/insert/?$ /objet.php?action=insert
#Update object
Header set Access-Control-Allow-Origin "*"
RewriteCond %{REQUEST_METHOD} POST
RewriteRule ^api/objet/update/?$ /objet.php?action=update
#get infos sur une foire
Header set Access-Control-Allow-Origin "*"
RewriteRule ^api/foire/([0-9]+)/?$ /foire.php?foire=$1
#Creer foire
Header set Access-Control-Allow-Origin "*"
RewriteCond %{REQUEST_METHOD} POST
RewriteRule ^api/foire/insert/?$ /foire.php?action=insert
#Modifier foire
Header set Access-Control-Allow-Origin "*"
RewriteCond %{REQUEST_METHOD} POST
RewriteRule ^api/foire/update/?$ /update.php?action=update
#get objets d'un user d'une foire
Header set Access-Control-Allow-Origin "*"
RewriteRule ^api/foire/([0-9]+)/vendeur/([0-9]+)/?$ /foire.php?foire=$1&user=$2
#get objets d'une foire
Header set Access-Control-Allow-Origin "*"
RewriteRule ^api/foire/([0-9]+)/objets/?$ /foire.php?foire=$1&objets=1
#Mettre a jour infos utilisateur
Header set Access-Control-Allow-Origin "*"
RewriteCond %{REQUEST_METHOD} POST
RewriteRule ^api/user/update/?$ /user.php?action=update
#Creer un utilisateur
Header set Access-Control-Allow-Origin "*"
RewriteCond %{REQUEST_METHOD} POST
RewriteRule ^api/user/insert/?$ /user.php?action=insert
#Mettre a jour mot de passe
Header set Access-Control-Allow-Origin "*"
RewriteCond %{REQUEST_METHOD} POST
RewriteRule ^api/user/update/password/?$ /user.php?action=updatepwd
#Participant
Header set Access-Control-Allow-Origin "*"
RewriteCond %{REQUEST_METHOD} POST
RewriteRule ^api/foire/participant/?$ /foire.php?action=participant