forked from matecat/MateCat
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.htaccess
119 lines (89 loc) · 4.87 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
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
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/css/build/common.css [NC]
#RewriteCond %{REQUEST_URI} !/public/img/logo.png [NC]
#RewriteCond %{REQUEST_URI} !/public/img/offline.png [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 ^(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=$4&password=$5 [L]
RewriteRule ^(analyze-old)/([^/]*)/([^/]*)-([^/]*)$ index.php?action=analyzeOld&pid=$3&password=$4 [L]
RewriteRule ^(jobanalysis-old)/([^/]*)-([^/]*)-([^/]*)/?$ index.php?action=analyzeOld&pid=$2&jid=$3&password=$4 [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 ^(oauth)/(response)[/]?$ index.php?action=oauthResponseHandler [L,QSA]
RewriteRule ^(manage)[/]?$ index.php?action=manage [QSA,L]
RewriteRule ^(manageNew)[/]?$ index.php?action=manageNew [QSA,L]
RewriteRule ^(editlog)/([^/]*)-([^/]*)/?$ index.php?action=editlog&jid=$2&password=$3 [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=newDetatched [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
</IfModule>
ErrorDocument 404 /support/404.php
<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"
ExpiresByType application/x-shockwave-flash "access plus 1 month"
</IfModule>
<IfModule mod_deflate.c>
#SetOutputFilter DEFLATE
AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css text/javascript
AddOutputFilterByType DEFLATE font/truetype
AddOutputFilterByType DEFLATE application/xml application/xhtml+xml appalication/rss+xml
AddOutputFilterByType DEFLATE application/javascript application/x-javascript application/json
#AddOutputFilterByType DEFLATE application/x-httpd-php
</IfModule>
<IfModule mod_setenvif.c>
SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png)$ no-gzip dont-vary
SetEnvIfNoCase Request_URI \.(?:exe|t?gz|zip|bz2|sit|rar)$ no-gzip dont-vary
SetEnvIfNoCase Request_URI \.(?:avi|mov|mp3|mp4|rm)$ no-gzip dont-vary
SetEnvIfNoCase Request_URI \.pdf$ no-gzip dont-vary
BrowserMatch ^Mozilla/4 gzip-only-text/html
BrowserMatch ^Mozilla/4\.0[678] no-gzip
BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
BrowserMatch \bMSI[E] !no-gzip !gzip-only-text/html
</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>
Header set Access-Control-Allow-Origin "*"
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