-
Notifications
You must be signed in to change notification settings - Fork 183
/
.htaccess
104 lines (77 loc) · 4.07 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
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
104
php_value magic_quotes_gpc off
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond "%{HTTP_HOST}" "!^www\.matecat\.com" [NC]
RewriteRule ^robots\.txt$ robots-whitelabel.txt [L]
#RewriteRule ^offline\.html$ /lib/View/offline.html [L]
#RewriteCond %{REQUEST_URI} !/offline.html [NC]
#RewriteCond %{REQUEST_URI} !/public/build/runtime\.(.+)\.js [NC]
#RewriteCond %{REQUEST_URI} !/public/build/commonCss\.(.+)\.(css|js) [NC]
#RewriteCond %{REQUEST_URI} !/public/build/images/(.+)\.svg [NC]
#RewriteCond %{REQUEST_URI} !/img/meta/favicon(.+)\.svg [NC]
#RewriteRule $ /offline.html [R=307,L]
RewriteCond %{REQUEST_URI} /offline.html
RewriteRule $ / [R=307,L]
RewriteCond %{QUERY_STRING} submit=Search
RewriteRule ^$ /support [QSA,L]
RewriteRule ^$ index.php?action=newProject [QSA,L]
RewriteRule ^fileupload/$ lib/View/fileupload/index.php [QSA,L]
RewriteRule ^signin[/]?$ index.php?action=signin [QSA,L]
RewriteRule ^action/convertFile[/]?$ index.php?action=convertFile [QSA,L]
RewriteRule ^(translate)[/]?$ index.php?action=cat [L]
RewriteRule ^(translate)/([^/]*)/([^/]*)/([^/\-]*)-(?:[0-9]*-)?([^/]*)[/]*$ index.php?action=cat&jid=$4&password=$5 [L]
RewriteRule ^(revise)[/]?$ index.php?action=cat [L]
RewriteRule ^(revise)([^/]*)?/([^/]*)/([^/]*)/([^/\-]*)-(?:[0-9]*-)?([^/]*)[/]*$ index.php?action=cat&jid=$5&password=$6&revision=$2 [L]
RewriteRule ^(analyze)/([^/]*)/([^/]*)-([^/]*)$ index.php?action=analyze&pid=$3&password=$4 [L]
RewriteRule ^(jobanalysis)/([^/]*)-([^/]*)-([^/]*)/?$ index.php?action=analyze&pid=$2&jid=$3&password=$4 [L]
RewriteRule ^(login)[/]?$ index.php?action=loginPage [L,QSA]
RewriteRule ^(manage)[/]?$ index.php?action=manage [QSA,L]
RewriteRule ^(revise-summary)/([^/]*)-([^/]*)/?$ index.php?action=reviseSummary&jid=$2&password=$3 [L]
RewriteRule ^(referenceFile)/([^/]*)/([^/]*)/([^/]*)?$ index.php?action=referenceFile&job_id=$2&job_password=$3&segment_id=$4 [L]
RewriteRule ^activityLog/([^/]*)/([^/]*)[/]?(download)?$ index.php?action=activityLog&id_project=$1&password=$2&download=$3 [QSA,L]
RewriteRule ^utils/xliff-to-target$ index.php?action=xliffToTargetView [L]
RewriteRule ^api/docs$ lib/View/APIDoc.php [L]
RewriteRule ^api/v1/new$ index.php?api=true&action=new [QSA,L]
RewriteRule ^(api)[/]?([^/]*)?[/]?$ index.php?api=true&action=$2 [QSA,L]
RewriteRule ^api/(.*)$ router.php [QSA,L]
RewriteRule ^webhooks/(.*)$ router.php [QSA,L]
RewriteRule ^gdrive/(.*)$ router.php [QSA,L]
RewriteRule ^utils/pee$ router.php [L]
RewriteRule ^TMX/([^/]*)/([^/]*)[/]?$ index.php?action=exportTMX&jid=$1&jpass=$2 [L]
RewriteRule ^SDLXLIFF/([^/]*)/([^/]*)/([^/]*)[/]?$ index.php?action=downloadFile&id_job=$1&password=$2&filename=$3&forceXliff=1 [L]
RewriteRule ^translation/([^/]*)/([^/]*)[/]?$ index.php?action=downloadFile&id_job=$1&password=$2 [L]
RedirectMatch 404 ^/\.git
RedirectMatch 404 ^/vendor
RedirectMatch 404 ^/storage
</IfModule>
ErrorDocument 401 /lib/View/401.html
ErrorDocument 403 /lib/View/403.html
ErrorDocument 404 /lib/View/404.html
ErrorDocument 409 /lib/View/409.html
ErrorDocument 503 /lib/View/503.html
ErrorDocument 500 /lib/View/500.html
SetEnvIf ^ ^ no-gzip
SetEnvIfNoCase Request_URI \.(?:css|js)$ !no-gzip
<IfModule mod_expires.c>
ExpiresActive On
ExpiresByType text/html "access plus 1 hour"
ExpiresByType text/css "access plus 1 hour"
ExpiresByType text/javascript "access plus 1 hour"
ExpiresByType application/javascript "access plus 1 hour"
ExpiresByType image/gif "access plus 1 month"
ExpiresByType image/jpeg "access plus 1 month"
ExpiresByType image/jpg "access plus 1 month"
ExpiresByType image/png "access plus 1 month"
ExpiresByType image/vnd.microsoft.icon "access plus 1 month"
ExpiresByType image/ico "access plus 1 month"
</IfModule>
<IfModule mod_headers.c>
Header append Vary User-Agent env=!dont-vary
Header always append X-Frame-Options SAMEORIGIN
Header always append X-Content-Type-Options nosniff
Header always append X-XSS-Protection "1; mode=block"
</IfModule>
php_value display_errors 0
php_value log_errors 1
php_value error_log storage/log_archive/php_errors.txt
php_value short_open_tag on