-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhtaccess
91 lines (79 loc) · 4.29 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
---
layout: none
permalink: .htaccess
---
Header set X-UA-Compatible "IE=Edge,chrome=1"
# disable apache server signature
ServerSignature Off
# enable browser caching
<IfModule mod_expires.c>
ExpiresActive On
ExpiresByType image/jpg "access 1 week"
ExpiresByType image/jpeg "access 1 week"
ExpiresByType image/gif "access 1 week"
ExpiresByType image/png "access 1 week"
ExpiresByType text/css "access 3 days"
ExpiresByType text/html "access 3 days"
ExpiresByType application/pdf "access 3 days"
ExpiresByType text/x-javascript "access 3 days"
ExpiresByType application/x-shockwave-flash "access 3 days"
ExpiresByType image/x-icon "access 1 week"
ExpiresDefault "access 3 days"
</IfModule>
# enable url rewriting
RewriteEngine On
# builtinbruges.com => www.builtinbruges.com
RewriteCond %{HTTP_HOST} !^www.builtinbruges.com$ [NC]
RewriteCond %{HTTP_HOST} !^beta.builtinbruges.com$ [NC]
RewriteRule ^(.*)$ http://www.builtinbruges.com/$1 [L,R=301]
# Block libwww-perl (spam & bots)
SetEnvIfNoCase User-Agent "^libwww-perl*" block_bad_bots
Deny from env=block_bad_bots
# Incorrect Links
Redirect 301 /2013/07/finding-all-emails-in-apple-mail/blog-url http://www.builtinbruges.com/2013/07/finding-all-emails-in-apple-mail
Redirect 301 /2013/07/finding-all-emails-in-apple-mail/post-url http://www.builtinbruges.com/2013/07/finding-all-emails-in-apple-mail
Redirect 301 /2013/07/why-javascript-web-applications-should-embrace-traditional-urls/post-url http://www.builtinbruges.com/2013/07/why-javascript-web-applications-should-embrace-traditional-urls
# Moved Posts
Redirect 301 /2013/04/ruby-vs-php http://www.builtinbruges.com/2013/04/ruby-on-rails-vs-php
Redirect 301 /2013/08/using-ajax-urls-in-jekyll http://www.builtinbruges.com/2013/08/using-ajax-content-in-jekyll
# Removed Posts
Redirect 301 /2013/08/sourceforge-is-encouraging-its-top-projects-to-bundle-adware-spyware/ http://www.builtinbruges.com/blog.html
Redirect 301 /2013/01/happy-new-year/ http://www.builtinbruges.com/blog.html
Redirect 301 /en/blog/13/make-paste-and-match-style-the-default-for-the-v-shortcut http://www.builtinbruges.com/blog.html
Redirect 301 /2012/08/blog-update/ http://www.builtinbruges.com/blog.html
Redirect 301 /2013/01/paste-and-match-style/ http://www.builtinbruges.com/blog.html
Redirect 301 /2013/07/nifty-modal-window-effects/ http://www.builtinbruges.com/blog.html
Redirect 301 /1998/01/wintel http://www.builtinbruges.com
# Old Pages
Redirect 301 /blog/page4/ http://www.builtinbruges.com/blog.html
Redirect 301 /blog/page3/ http://www.builtinbruges.com/blog.html
Redirect 301 /blog/page2/ http://www.builtinbruges.com/blog.html
# Redirects for new website
Redirect 301 /blog.html http://www.builtinbruges.com/en/blog/
Redirect 301 /archive.html http://www.builtinbruges.com/en/blog/
Redirect 301 /contact.html http://www.builtinbruges.com/en/hire-me/
Redirect 301 /clients.html http://www.builtinbruges.com/en/work/
Redirect 301 /nl/werk http://www.builtinbruges.com/nl/portfolio
Redirect 301 /algemene-voorwaarden http://www.builtinbruges.com/nl/algemene-voorwaarden
Redirect 301 /index.html http://www.builtinbruges.com/index.php
# Block Russian Referrer Spam
RewriteEngine on
RewriteCond %{HTTP_REFERER} ^http://.*ilovevitaly\.com/ [NC,OR]
RewriteCond %{HTTP_REFERER} ^http://.*ilovevitaly.\.ru/ [NC,OR]
RewriteCond %{HTTP_REFERER} ^http://.*ilovevitaly\.org/ [NC,OR]
RewriteCond %{HTTP_REFERER} ^http://.*ilovevitaly\.info/ [NC,OR]
RewriteCond %{HTTP_REFERER} ^http://.*iloveitaly\.ru/ [NC,OR]
RewriteCond %{HTTP_REFERER} ^http://.*econom\.co/ [NC,OR]
RewriteCond %{HTTP_REFERER} ^http://.*savetubevideo\.com/ [NC,OR]
RewriteCond %{HTTP_REFERER} ^http://.*kambasoft\.com/ [NC,OR]
RewriteCond %{HTTP_REFERER} ^http://.*buttons\-for\-website\.com/ [NC,OR]
RewriteCond %{HTTP_REFERER} ^http://.*floating\-share\-buttons\.com/ [NC,OR]
RewriteCond %{HTTP_REFERER} ^http://.*semalt\.com/ [NC,OR]
RewriteCond %{HTTP_REFERER} ^http://.*darodar\.com/ [NC]
RewriteCond %{HTTP_REFERER} ^http://.*4webmasters\.com/ [NC]
RewriteCond %{HTTP_REFERER} ^http://.*trafficmonetizer\.org/ [NC]
RewriteCond %{HTTP_REFERER} ^http://.*traffic2money\.com/ [NC]
RewriteCond %{HTTP_REFERER} ^http://.*success\-seo\.com/ [NC]
RewriteCond %{HTTP_REFERER} ^http://.*event\-tracking\.com/ [NC]
RewriteCond %{HTTP_REFERER} ^http://.*webmonetizer\.net/ [NC]
RewriteRule ^(.*)$ – [F,L]