-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy path.htaccess.dist
103 lines (90 loc) · 5.04 KB
/
.htaccess.dist
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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
#HTACCESS FOR LOCALHOST
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteBase /datan
# redirection of votes
RewriteRule ^votes/vote_([0-9]{1,4}) ./votes/legislature-15/vote_$1 [R=301,L]
RewriteRule ^votes/all/([0-9]{4})/([0-9]{2}) ./votes/legislature-15/$1/$2 [R=301,L]
RewriteRule ^votes/all/([0-9]{4}) ./votes/legislature-15/$1 [R=301,L]
RewriteRule ^votes/all ./votes/legislature-15 [R=301,L]
# redirection of groups (old URLs) (one per group)
RewriteRule ^groupes/larem/(.*)$ ./groupes/legislature-15/larem/$1 [R=301,L]
RewriteRule ^groupes/larem ./groupes/legislature-15/larem [R=301,L]
RewriteRule ^groupes/lr/(.*)$ ./groupes/legislature-15/lr/$1 [R=301,L]
RewriteRule ^groupes/lr ./groupes/legislature-15/lr [R=301,L]
RewriteRule ^groupes/dem/(.*)$ ./groupes/legislature-15/dem/$1 [R=301,L]
RewriteRule ^groupes/dem ./groupes/legislature-15/dem [R=301,L]
RewriteRule ^groupes/soc/(.*)$ ./groupes/legislature-15/soc/$1 [R=301,L]
RewriteRule ^groupes/soc ./groupes/legislature-15/soc [R=301,L]
RewriteRule ^groupes/agir-e/(.*)$ ./groupes/legislature-15/agir-e/$1 [R=301,L]
RewriteRule ^groupes/agir-e ./groupes/legislature-15/agir-e [R=301,L]
RewriteRule ^groupes/ni/(.*)$ ./groupes/legislature-15/ni/$1 [R=301,L]
RewriteRule ^groupes/ni ./groupes/legislature-15/ni [R=301,L]
RewriteRule ^groupes/udi_i/(.*)$ ./groupes/legislature-15/udi_i/$1 [R=301,L]
RewriteRule ^groupes/udi_i ./groupes/legislature-15/udi_i [R=301,L]
RewriteRule ^groupes/lt/(.*)$ ./groupes/legislature-15/lt/$1 [R=301,L]
RewriteRule ^groupes/lt ./groupes/legislature-15/lt [R=301,L]
RewriteRule ^groupes/fi/(.*)$ ./groupes/legislature-15/fi/$1 [R=301,L]
RewriteRule ^groupes/fi ./groupes/legislature-15/fi [R=301,L]
RewriteRule ^groupes/gdr/(.*)$ ./groupes/legislature-15/gdr/$1 [R=301,L]
RewriteRule ^groupes/gdr ./groupes/legislature-15/gdr [R=301,L]
RewriteRule ^groupes/eds/(.*)$ ./groupes/legislature-15/eds/$1 [R=301,L]
RewriteRule ^groupes/eds ./groupes/legislature-15/eds [R=301,L]
RewriteRule ^groupes/lc/(.*)$ ./groupes/legislature-15/lc/$1 [R=301,L]
RewriteRule ^groupes/lc ./groupes/legislature-15/lc [R=301,L]
RewriteRule ^groupes/modem/(.*)$ ./groupes/legislature-15/modem/$1 [R=301,L]
RewriteRule ^groupes/modem ./groupes/legislature-15/modem [R=301,L]
RewriteRule ^groupes/ng/(.*)$ ./groupes/legislature-15/ng/$1 [R=301,L]
RewriteRule ^groupes/ng ./groupes/legislature-15/ng [R=301,L]
RewriteRule ^groupes/udi-i/(.*)$ ./groupes/legislature-15/udi-i/$1 [R=301,L]
RewriteRule ^groupes/udi-i ./groupes/legislature-15/udi-i [R=301,L]
RewriteRule ^groupes/udi-i-a/(.*)$ ./groupes/legislature-15/udi-i-a/$1 [R=301,L]
RewriteRule ^groupes/udi-i-a ./groupes/legislature-15/udi-i-a [R=301,L]
RewriteRule ^groupes/udi-agir/(.*)$ ./groupes/legislature-15/udi-agir/$1 [R=301,L]
RewriteRule ^groupes/udi-agir ./groupes/legislature-15/udi-agir [R=301,L]
# redirection of individaul MPs
RewriteRule ^deputes/essonne-91/depute_eva-sas$ ./deputes/paris-75/depute_eva-sas [R=301,L]
# redirection of votes_all pages
RewriteRule ^deputes/([^/]+)/([^/]+)/votes/all$ /deputes/$1/$2/votes [R=301,L]
# redirection of dashboard-mp
RewriteRule ^dashboard-mp/(.*)$ ./dashboard/$1 [R=301,L]
RewriteRule ^dashboard-mp ./dashboard [R=301,L]
# redirection of MPs' vote fields
RewriteCond %{REQUEST_URI} !votes/all [NC]
RewriteRule ^deputes/(.*)/depute_(.*)/votes/(.*) ./deputes/$1/depute_$2/votes [R=301,L]
# redirection of groups' vote fields
RewriteCond %{REQUEST_URI} !votes/all [NC]
RewriteRule ^groupes/legislature-(.*)/(.*)/votes/(.*) ./groupes/legislature-$1/$2/votes [R=301,L]
# remove trailing slashes from URLs
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} (.*)/$
RewriteRule ^(.+)/$ $1 [R,L]
RewriteCond $1 !^(index\.php|resources|robots\.txt)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L,QSA]
RewriteRule ^scripts/?$ ./scripts/admin.php/ [L]
# remove trailing slashes from URLs
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} (.*)/$
RewriteRule ^(.+)/$ $1 [R,L]
</IfModule>
<IfModule mod_env.c>
SetEnv MYSQL_USERNAME username_example
SetEnv MYSQL_PASSWORD password_example
SetEnv MYSQL_NAME datan
SetEnv MYSQL_HOST localhost
SetEnv CI_ENV production
SetEnv BASE_URL http://localhost/datan
SetEnv ABSOLUTE_PATH your absolute path of the folder in which this file is located
SetEnv COMPOSER_AUTOLOAD your composer autoload file
SetEnv API_KEY_NOBG get your api key on remove.bg
SetEnv API_KEY_MAILJET api key for newsletter
SetEnv API_KEY_SECRETE_MAILJET secrete api key for newsletter
SetEnv API_MJML_ID api key for newsletter
SetEnv API_MJML_SECRETE_KEY secrete api key for newsletter
SetEnv EMAIL_DATAN Not necessary for running the website locally
SetEnv EMAIL_DATAN_PASSWORD Not necessary for running the website locally
SetEnv EMAIL_DATAN_HOST Not necessary for running the website locally
SetEnv EMAIL_BACKUP Not necessary for running the website locally
</IfModule>