/
.htaccess
43 lines (30 loc) · 1.03 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
#
# Compression
#
AddOutputFilterByType DEFLATE text/html text/plain text/xml text/javascript text/css application/x-javascript application/xhtml+xml application/xml application/rss+xml application/atom+xml application/x-httpd-php application/x-httpd-fastphp application/x-httpd-eruby application/postscript image/svg+xml
#
# Deny access to directory listing and Follow symbolic links
#
Options -Indexes +SymLinksIfOwnerMatch
DirectoryIndex index.html index.htm index.php
IndexIgnore *
#
# Redirect errors to a custom page
#
ErrorDocument 404 /404.html
#
# Rewrites...
#
RewriteEngine On
# Redirect links to downloads from other domains
RewriteCond %{HTTP_REFERER} !^http://(www\.)?sem4r\.com/ [NC]
RewriteCond %{HTTP_REFERER} !^$
RewriteRule ^(.*)/[^/]+\.(pkg|dmg|zip)$ $1/ [R,NC,L]
# Prevent accessing hidden files
RewriteRule ^(.*/)?\. - [F,NS,L]
#
# Feedburner
#
RewriteCond %{HTTP_USER_AGENT} !^(FeedBurner|FeedValidator) [NC]
RewriteCond %{QUERY_STRING} !debug [NC]
RewriteRule ^atom.xml http://feeds2.feedburner.com/sem4r [L,R=302]