-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.htaccess
261 lines (233 loc) · 12.2 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
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
# ----------------------------------------------------------------------
# Force the latest IE version
# ----------------------------------------------------------------------
<IfModule mod_headers.c>
Header set X-UA-Compatible "IE=Edge,chrome=1"
<FilesMatch "\.(js|css|gif|png|jpe?g|pdf|xml|oga|ogg|m4a|ogv|mp4|m4v|webm|svg|svgz|eot|ttf|otf|woff|ico|webp|appcache|manifest|htc|crx|xpi|safariextz|vcf)$" >
Header unset X-UA-Compatible
</FilesMatch>
</IfModule>
# ----------------------------------------------------------------------
# Gzip compression
# ----------------------------------------------------------------------
<IfModule mod_deflate.c>
# Force deflate for mangled headers developer.yahoo.com/blogs/ydn/posts/2010/12/pushing-beyond-gzipping/
<IfModule mod_setenvif.c>
<IfModule mod_headers.c>
SetEnvIfNoCase ^(Accept-EncodXng|X-cept-Encoding|X{15}|~{15}|-{15})$ ^((gzip|deflate)\s*,?\s*)+|[X~-]{4,13}$ HAVE_Accept-Encoding
RequestHeader append Accept-Encoding "gzip,deflate" env=HAVE_Accept-Encoding
</IfModule>
</IfModule>
# HTML, TXT, CSS, JavaScript, JSON, XML, HTC:
<IfModule filter_module>
FilterDeclare COMPRESS
FilterProvider COMPRESS DEFLATE "%{Content_Type} = '$text/html'"
FilterProvider COMPRESS DEFLATE "%{Content_Type} = '$text/css'"
FilterProvider COMPRESS DEFLATE "%{Content_Type} = '$text/plain'"
FilterProvider COMPRESS DEFLATE "%{Content_Type} = '$text/javascript'"
FilterProvider COMPRESS DEFLATE "%{Content_Type} = '$text/xml'"
FilterProvider COMPRESS DEFLATE "%{Content_Type} = '$text/x-component'"
FilterProvider COMPRESS DEFLATE "%{Content_Type} = '$application/javascript'"
FilterProvider COMPRESS DEFLATE "%{Content_Type} = '$application/x-javascript'"
FilterProvider COMPRESS DEFLATE "%{Content_Type} = '$application/json'"
FilterProvider COMPRESS DEFLATE "%{Content_Type} = '$application/xml'"
FilterProvider COMPRESS DEFLATE "%{Content_Type} = '$application/xhtml+xml'"
FilterProvider COMPRESS DEFLATE "%{Content_Type} = '$application/rss+xml'"
FilterProvider COMPRESS DEFLATE "%{Content_Type} = '$application/atom+xml'"
FilterProvider COMPRESS DEFLATE "%{Content_Type} = '$application/vnd.ms-fontobject'"
FilterProvider COMPRESS DEFLATE "%{Content_Type} = '$image/svg+xml'"
FilterProvider COMPRESS DEFLATE "%{Content_Type} = '$application/x-font-ttf'"
FilterProvider COMPRESS DEFLATE "%{Content_Type} = '$application/x-font-otf'"
FilterProvider COMPRESS DEFLATE "%{Content_Type} = '$application/font-woff'"
FilterProvider COMPRESS DEFLATE "%{Content_Type} = '$application/font-woff2'"
FilterProvider COMPRESS DEFLATE "%{Content_Type} = '$application/vnd.ms-fontobject'"
FilterProvider COMPRESS DEFLATE "%{Content_Type} = '$font/opentype'"
FilterChain COMPRESS
FilterProtocol COMPRESS DEFLATE change=yes;byteranges=no
</IfModule>
<IfModule !mod_filter.c>
# Legacy versions of Apache
AddOutputFilterByType DEFLATE text/html text/plain text/css text/javascript
AddOutputFilterByType DEFLATE application/javascript application/x-javascript application/json
AddOutputFilterByType DEFLATE text/xml application/xml text/x-component
AddOutputFilterByType DEFLATE application/xhtml+xml application/rss+xml application/atom+xml
AddOutputFilterByType DEFLATE image/svg+xml application/vnd.ms-fontobject application/x-font-ttf font/opentype
</IfModule>
</IfModule>
# ----------------------------------------------------------------------
# Expires headers (for better cache control)
# ----------------------------------------------------------------------
<IfModule mod_expires.c>
ExpiresActive on
# Perhaps better to whitelist expires rules? Perhaps.
ExpiresDefault "access plus 1 month"
# cache.appcache needs re-requests in FF 3.6 (thanks Remy ~Introducing HTML5)
ExpiresByType text/cache-manifest "access plus 0 seconds"
# Your document html
ExpiresByType text/html "access plus 0 seconds"
# Data
ExpiresByType text/xml "access plus 0 seconds"
ExpiresByType application/xml "access plus 0 seconds"
ExpiresByType application/json "access plus 0 seconds"
# Feed
ExpiresByType application/rss+xml "access plus 1 hour"
ExpiresByType application/atom+xml "access plus 1 hour"
# Favicon (cannot be renamed)
ExpiresByType image/x-icon "access plus 1 week"
# Media: images, video, audio
ExpiresByType image/gif "access plus 1 month"
ExpiresByType image/png "access plus 1 month"
ExpiresByType image/jpg "access plus 1 month"
ExpiresByType image/jpeg "access plus 1 month"
ExpiresByType video/ogg "access plus 1 month"
ExpiresByType audio/ogg "access plus 1 month"
ExpiresByType video/mp4 "access plus 1 month"
ExpiresByType video/webm "access plus 1 month"
# HTC files (css3pie)
ExpiresByType text/x-component "access plus 1 month"
# Webfonts
ExpiresByType font/truetype "access plus 1 month"
ExpiresByType font/opentype "access plus 1 month"
ExpiresByType application/x-font-woff "access plus 1 month"
ExpiresByType image/svg+xml "access plus 1 month"
ExpiresByType application/vnd.ms-fontobject "access plus 1 month"
# CSS and JavaScript
ExpiresByType text/css "access plus 1 year"
ExpiresByType application/javascript "access plus 1 year"
<IfModule mod_headers.c>
Header append Cache-Control "public"
</IfModule>
</IfModule>
# ----------------------------------------------------------------------
# Blocks
# ----------------------------------------------------------------------
SetEnvIfNoCase Referer 4webmasters.org spambot=yes
SetEnvIfNoCase Referer 7makemoneyonline.com spambot=yes
SetEnvIfNoCase Referer acads.net spambot=yes
SetEnvIfNoCase Referer adcash.com spambot=yes
SetEnvIfNoCase Referer addons.mozilla.org spambot=yes
SetEnvIfNoCase Referer adviceforum.info spambot=yes
SetEnvIfNoCase Referer aliexpress.com spambot=yes
SetEnvIfNoCase Referer amanda-porn.ga spambot=yes
SetEnvIfNoCase Referer anal-acrobats.hol.es spambot=yes
SetEnvIfNoCase Referer anonymous-redirect.com spambot=yes
SetEnvIfNoCase Referer anticrawler.org spambot=yes
SetEnvIfNoCase Referer azurewebsites.net spambot=yes
SetEnvIfNoCase Referer baixar-musicas-gratis.com spambot=yes
SetEnvIfNoCase Referer best-seo-offer.com spambot=yes
SetEnvIfNoCase Referer best-seo-solution.com spambot=yes
SetEnvIfNoCase Referer bestwebsitesawards.com spambot=yes
SetEnvIfNoCase Referer blackhatworth.com spambot=yes
SetEnvIfNoCase Referer brakehawk.com spambot=yes
SetEnvIfNoCase Referer buttons-for-website.com spambot=yes
SetEnvIfNoCase Referer buttons-for-your-website.com spambot=yes
SetEnvIfNoCase Referer buy-cheap-online.info spambot=yes
SetEnvIfNoCase Referer cenokos.ru spambot=yes
SetEnvIfNoCase Referer cenoval.ru spambot=yes
SetEnvIfNoCase Referer cityadspix.com spambot=yes
SetEnvIfNoCase Referer darodar.com spambot=yes
SetEnvIfNoCase Referer depositfiles-porn.ga spambot=yes
SetEnvIfNoCase Referer descargar-musicas-gratis.com spambot=yes
SetEnvIfNoCase Referer econom.co spambot=yes
SetEnvIfNoCase Referer edakgfvwql.ru spambot=yes
SetEnvIfNoCase Referer event-tracking.com spambot=yes
SetEnvIfNoCase Referer fbdownloader.com spambot=yes
SetEnvIfNoCase Referer forum.smailik.org spambot=yes
SetEnvIfNoCase Referer forum20.smailik.org spambot=yes
SetEnvIfNoCase Referer forum69.info spambot=yes
SetEnvIfNoCase Referer free-share-buttons.com spambot=yes
SetEnvIfNoCase Referer generalporn.org spambot=yes
SetEnvIfNoCase Referer Get-Free-Traffic-Now.com spambot=yes
SetEnvIfNoCase Referer get-free-traffic-now.com spambot=yes
SetEnvIfNoCase Referer gobongo.info spambot=yes
SetEnvIfNoCase Referer googlsucks.com spambot=yes
SetEnvIfNoCase Referer hulfingtonpost.com spambot=yes
SetEnvIfNoCase Referer humanorightswatch.org spambot=yes
SetEnvIfNoCase Referer ilovevitaly.co spambot=yes
SetEnvIfNoCase Referer ilovevitaly.com spambot=yes
SetEnvIfNoCase Referer ilovevitaly.ru spambot=yes
SetEnvIfNoCase Referer iminent.com spambot=yes
SetEnvIfNoCase Referer iskalko.ru spambot=yes
SetEnvIfNoCase Referer Iskalko.ru spambot=yes
SetEnvIfNoCase Referer jamus.co.uk spambot=yes
SetEnvIfNoCase Referer kabbalah-red-bracelets.com spambot=yes
SetEnvIfNoCase Referer kambasoft.com spambot=yes
SetEnvIfNoCase Referer lomb.co spambot=yes
SetEnvIfNoCase Referer lombia.co spambot=yes
SetEnvIfNoCase Referer lumb.co spambot=yes
SetEnvIfNoCase Referer luxup.ru spambot=yes
SetEnvIfNoCase Referer makemoneyonline.com spambot=yes
SetEnvIfNoCase Referer masterseek.com spambot=yes
SetEnvIfNoCase Referer meendo-free-traffic.ga spambot=yes
SetEnvIfNoCase Referer myftpupload.com spambot=yes
SetEnvIfNoCase Referer mywb.org spambot=yes
SetEnvIfNoCase Referer o-o-6-o-o.com spambot=yes
SetEnvIfNoCase Referer o-o-6-o-o.ru spambot=yes
SetEnvIfNoCase Referer o-o-8-o-o.ru spambot=yes
SetEnvIfNoCase Referer ok.ru spambot=yes
SetEnvIfNoCase Referer pornhub-forum.ga spambot=yes
SetEnvIfNoCase Referer pornhub-forum.uni.me spambot=yes
SetEnvIfNoCase Referer priceg.com spambot=yes
SetEnvIfNoCase Referer priceg.comkambasoft.com spambot=yes
SetEnvIfNoCase Referer prlog.ru spambot=yes
SetEnvIfNoCase Referer ranksonic.info spambot=yes
SetEnvIfNoCase Referer ranksonic.org spambot=yes
SetEnvIfNoCase Referer rapidgator-porn.ga spambot=yes
SetEnvIfNoCase Referer resellerclub scam spambot=yes
SetEnvIfNoCase Referer responsinator.com spambot=yes
SetEnvIfNoCase Referer responsivetest.net spambot=yes
SetEnvIfNoCase Referer savetubevideo.com spambot=yes
SetEnvIfNoCase Referer savetubevideo.info spambot=yes
SetEnvIfNoCase Referer screentoolkit.com spambot=yes
SetEnvIfNoCase Referer see-your-website-here.com spambot=yes
SetEnvIfNoCase Referer semalt.com spambot=yes
SetEnvIfNoCase Referer semalt.semalt.com spambot=yes
SetEnvIfNoCase Referer seo-platform.com spambot=yes
SetEnvIfNoCase Referer seoexperimenty.ru spambot=yes
SetEnvIfNoCase Referer sexyali.com spambot=yes
SetEnvIfNoCase Referer sexyteens.hol.es spambot=yes
SetEnvIfNoCase Referer simple-share-buttons.com spambot=yes
SetEnvIfNoCase Referer slftsdybbg.ru spambot=yes
SetEnvIfNoCase Referer social-buttons.com spambot=yes
SetEnvIfNoCase Referer social-buttons.coms.click.aliexpress.com spambot=yes
SetEnvIfNoCase Referer socialseet.ru spambot=yes
SetEnvIfNoCase Referer srecorder.com spambot=yes
SetEnvIfNoCase Referer success-seo.com spambot=yes
SetEnvIfNoCase Referer superiends.org spambot=yes
SetEnvIfNoCase Referer theguardlan.com spambot=yes
SetEnvIfNoCase Referer torture.ml spambot=yes
SetEnvIfNoCase Referer traffic2money.com spambot=yes
SetEnvIfNoCase Referer video--production.com spambot=yes
SetEnvIfNoCase Referer vodkoved.ru spambot=yes
SetEnvIfNoCase Referer webmaster-traffic.com spambot=yes
SetEnvIfNoCase Referer websocial.me spambot=yes
SetEnvIfNoCase Referer www.Get-Free-Traffic-Now.com spambot=yes
SetEnvIfNoCase Referer ykecwqlixx.ru spambot=yes
SetEnvIfNoCase Referer youporn-forum.ga spambot=yes
SetEnvIfNoCase Referer floating-share-buttons.com spambot=yes
SetEnvIfNoCase Referer get-free-social-traffic.com spambot=yes
SetEnvIfNoCase Referer free-floating-buttons.com spambot=yes
SetEnvIfNoCase Referer chinese-amezon.com spambot=yes
SetEnvIfNoCase Referer www.event-tracking.com spambot=yes
SetEnvIfNoCase Referer qualitymarketzone.com spambot=yes
SetEnvIfNoCase Referer www.event-tracking.com spambot=yes
SetEnvIfNoCase Referer hongfanji.com spambot=yes
SetEnvIfNoCase Referer Get-Free-Traffic-Now.com spambot=yes
SetEnvIfNoCase Referer how-to-earn-quick-money.com spambot=yes
Order allow,deny
Allow from all
Deny from env=spambot
# ----------------------------------------------------------------------
# Rewrites
# ----------------------------------------------------------------------
RewriteEngine On
RewriteBase /
# Redirect to one and only domain used
RewriteCond %{HTTP_HOST} !^thedomain.co.uk$ [NC]
RewriteRule ^(.*)$ http://thedomain.co.uk/$1 [R=301,L]
# Redirect trailing slash to without
RewriteRule ^(.+)/$ $1 [L,NC,R=301]
RewriteCond $1 !\.(gif|jpe?g|png)$ [NC]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /index.php?/$1 [L]