forked from jcubic/jquery.terminal-www
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.htaccess
66 lines (49 loc) · 1.73 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
Options +FollowSymLinks
Options +Indexes
RewriteEngine on
RewriteCond %{HTTPS} off
RewriteCond %{HTTP_HOST} ^terminal.jcubic.pl
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
Header set Access-Control-Allow-Origin "*"
Header set Access-Control-Allow-Headers "Content-Type"
Header set Access-Control-Allow-Methods "POST, GET, OPTIONS"
#SetEnvIf Request_URI .*\.gz no-gzip=1
RewriteRule ^download/(.+) /download.php?file=$1 [NC,L]
#change name
RewriteRule documentation.php /api_reference.php [R=301]
RewriteRule comments.php /comments-rss.php
RewriteRule config.json - [F]
RewriteCond %{HTTP_HOST} ^www\.(.*) [NC]
RewriteRule ^(.*)$ http://%1/$1 [R=301]
RewriteCond %{query_string} ^=PHP.{36}$
RewriteRule (.*) - [F]
#RewriteCond %{query_string} !utm_source=
#RewriteCond %{query_string} !jquery.terminal
#RewriteCond %{query_string} .+
#RewriteRule (.*) - [F]
RewriteCond %{REQUEST_URI} ^.*//+(.*)
RewriteRule .* /%1 [R=301,L]
RewriteCond %{REQUEST_URI} ^//+$
RewriteRule .* / [R=301,L]
<FilesMatch "\.(ico|pdf|flv|jpg|jpeg|png|gif|js|css|swf|scm|rb|py|woff|svg|eot|ttf)$">
Header set Expires "Mon, 29 Sep 2011 20:00:00 GMT"
Header set Cache-Control "max-age=290304000, public"
Header unset Last-Modified
</FilesMatch>
#turn of Etag
Header unset ETag
FileETag None
#ExpiresActive On
#ExpiresByType image/gif A2592000
#ExpiresByType image/png A2592000
#ExpiresByType image/jpeg A2592000
#ExpiresByType image/x-icon A2592000
#ExpiresByType application/pdf A2592000
#ExpiresByType application/x-javascript A2592000
#ExpiresByType text/plain A2592000
#ExpiresByType text/css A10800
ErrorDocument 404 /404.shtml
ErrorDocument 400 /400.shtml
ErrorDocument 401 /401.shtml
ErrorDocument 403 /403.shtml
ErrorDocument 500 /500.shtml