-
Notifications
You must be signed in to change notification settings - Fork 12
Expand file tree
/
Copy path.htaccess
More file actions
38 lines (22 loc) · 1.22 KB
/
.htaccess
File metadata and controls
38 lines (22 loc) · 1.22 KB
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
# 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\.)?appden\.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/appden [L,R=302]
# Automatic translation from Google
RewriteRule ^(.*/)?(ar|bg|zh-CN|zh-TW|hr|cs|da|nl|fi|fr|de|el|hi|it|ja|ko|no|pl|pt|ro|ru|es|sv)$ http://www.google.com/translate_c?hl=$2&sl=en&u=http://appden.com/$1 [NC,L]