-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.htaccess
200 lines (180 loc) · 5.99 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
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{HTTP_HOST} ^www.celestiaproject.net$ [NC]
RewriteRule ^(.*)$ http://celestiaproject.net/forum/$1 [R=301,L]
#
# Uncomment the statement below if URL rewriting doesn't
# work properly. If you installed phpBB in a subdirectory
# of your site, properly set the argument for the statement.
# e.g.: if your domain is test.com and you installed phpBB
# in http://www.test.com/phpBB/index.php you have to set
# the statement RewriteBase /phpBB/
#
#RewriteBase /
#
# Uncomment the statement below if you want to make use of
# HTTP authentication and it does not already work.
# This could be required if you are for example using PHP via Apache CGI.
#
#RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization},L]
#
# The following 3 lines will rewrite URLs passed through the front controller
# to not require app.php in the actual URL. In other words, a controller is
# by default accessed at /app.php/my/controller, but can also be accessed at
# /my/controller
#
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ app.php [QSA,L]
#
# If symbolic links are not already being followed,
# uncomment the line below.
# http://anothersysadmin.wordpress.com/2008/06/10/mod_rewrite-forbidden-403-with-apache-228/
#
#Options +FollowSymLinks
</IfModule>
# With Apache 2.4 the "Order, Deny" syntax has been deprecated and moved from
# module mod_authz_host to a new module called mod_access_compat (which may be
# disabled) and a new "Require" syntax has been introduced to mod_authz_host.
# We could just conditionally provide both versions, but unfortunately Apache
# does not explicitly tell us its version if the module mod_version is not
# available. In this case, we check for the availability of module
# mod_authz_core (which should be on 2.4 or higher only) as a best guess.
<IfModule mod_version.c>
<IfVersion < 2.4>
<Files "config.php">
Order Allow,Deny
Deny from All
</Files>
<Files "common.php">
Order Allow,Deny
Deny from All
</Files>
</IfVersion>
<IfVersion >= 2.4>
<Files "config.php">
Require all denied
</Files>
<Files "common.php">
Require all denied
</Files>
</IfVersion>
</IfModule>
<IfModule !mod_version.c>
<IfModule !mod_authz_core.c>
<Files "config.php">
Order Allow,Deny
Deny from All
</Files>
<Files "common.php">
Order Allow,Deny
Deny from All
</Files>
</IfModule>
<IfModule mod_authz_core.c>
<Files "config.php">
Require all denied
</Files>
<Files "common.php">
Require all denied
</Files>
</IfModule>
</IfModule>
# Common
AddDefaultCharset utf-8
AddCharset utf-8 .html .css .js .xml .json .rss
Options -Indexes
<IfModule mod_php5.c>
php_flag magic_quotes_gpc off
php_flag register_globals off
</IfModule>
FileETag None
<IfModule mod_expires.c>
ExpiresActive On
</IfModule>
# Multimedia MIME types
AddType audio/ogg ogg oga
AddType video/ogg ogv
AddType audio/webm webma
AddType video/webm webm webmv
AddType audio/mp4 m4a
AddType video/mp4 mp4 m4v
AddType audio/opus opus
AddType audio/flac flac
AddType audio/aac aac
AddType audio/mpeg mp1 mp2 mp3 mpg mpeg
AddType audio/wav wav
<IfModule mod_expires.c>
ExpiresByType audio/ogg "access plus 3 month"
ExpiresByType video/ogg "access plus 3 month"
ExpiresByType audio/webm "access plus 3 month"
ExpiresByType video/webm "access plus 3 month"
ExpiresByType audio/mp4 "access plus 3 month"
ExpiresByType video/mp4 "access plus 3 month"
ExpiresByType audio/opus "access plus 3 month"
ExpiresByType audio/flac "access plus 3 month"
ExpiresByType audio/aac "access plus 3 month"
ExpiresByType audio/mpeg "access plus 3 month"
ExpiresByType audio/wav "access plus 3 month"
</IfModule>
# Image MIME types
AddType image/png png
AddType image/gif gif
AddType image/jpeg jpg jpeg
AddType image/webp webp
AddType image/svg+xml svg svgz
<IfModule mod_expires.c>
ExpiresByType image/png "access plus 1 month"
ExpiresByType image/gif "access plus 1 month"
ExpiresByType image/jpeg "access plus 1 month"
ExpiresByType image/webp "access plus 1 month"
ExpiresByType image/svg+xml "access plus 1 month"
</IfModule>
# Font MIME types
AddType font/ttf ttf
AddType font/otf otf
AddType application/x-font-woff woff
<IfModule mod_expires.c>
ExpiresByType font/ttf "access plus 1 month"
ExpiresByType font/otf "access plus 1 month"
ExpiresByType application/x-font-woff "access plus 1 month"
</IfModule>
# Text MIME types
AddType text/cache-manifest manifest
AddType text/javascript js
AddType text/css css
AddType text/html html
AddType text/plain txt log csv tsv
<IfModule mod_expires.c>
ExpiresByType text/cache-manifest "access plus 7 days"
ExpiresByType application/javascript "access plus 7 days"
ExpiresByType application/x-javascript "access plus 7 days"
ExpiresByType text/javascript "access plus 7 days"
ExpiresByType text/css "access plus 7 days"
ExpiresByType text/html "access plus 7 days"
</IfModule>
# Binary MIME types
AddType application/x-7z-compressed 7z
AddType application/x-shockwave-flash swf
<IfModule mod_expires.c>
ExpiresByType application/x-7z-compressed "access plus 1 month"
ExpiresByType application/x-shockwave-flash "access plus 1 month"
</IfModule>
# Gzip compression for Apache 2
<IfModule mod_deflate.c>
<IfModule mod_filter.c>
AddOutputFilterByType DEFLATE text/plain text/html text/xml text/css
AddOutputFilterByType DEFLATE text/javascript application/javascript application/x-javascript application/json
AddOutputFilterByType DEFLATE application/xml application/xhtml+xml application/rss+xml
AddOutputFilterByType DEFLATE font/ttf font/otf image/svg+xml
</IfModule>
</IfModule>
# Gzip compression for Apache 1
<IfModule mod_gzip.c>
mod_gzip_on Yes
mod_gzip_dechunk Yes
mod_gzip_item_include file \.(html?|txt|css|js|php)$
mod_gzip_item_include mime ^text/.*
mod_gzip_item_exclude mime ^image/.*
mod_gzip_item_exclude rspheader ^Content-Encoding:.*gzip.*
</IfModule>