all repos — h3rald @ cbe29955b3cdde5195736c915eb226ce471b2f29

The sources of https://h3rald.com

content/.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
-----
-----
# Don't show directory listings for URLs which map to a directory.
Options -Indexes

# Follow symbolic links in this directory.
Options +FollowSymLinks

# Unset ETags
Header unset ETag
FileETag None

# Compress text files.
<IfModule mod_deflate.c>
SetOutputFilter DEFLATE
# compress content with type html, text, js, and css
AddOutputFilterByType DEFLATE text/html text/plain text/css text/javascript application/javascript application/x-javascript
<IfModule mod_headers.c>
# properly handle requests coming from behind proxies
Header append Vary User-Agent
</IfModule>
# Properly handle old browsers that do not support compression
BrowserMatch ^Mozilla/4 gzip-only-text/html
BrowserMatch ^Mozilla/4\.0[678] no-gzip
BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
# Explicitly exclude binary files from compression just in case
SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png|pdf|swf|ico|zip)$ no-gzip
</IfModule>

# Custom errors
ErrorDocument 404 /404/index.html
ErrorDocument 403 /403/index.html
ErrorDocument 500 /500/index.html

# Set the default handler.
DirectoryIndex index.html

# Requires mod_expires to be enabled.
<IfModule mod_expires.c>
# Enable expirations.
ExpiresActive On

ExpiresDefault A14400
ExpiresByType application/javascript A2592000
ExpiresByType application/x-javascript A2592000
ExpiresByType text/javascript A2592000
ExpiresByType text/html A3600
ExpiresByType text/xml A3600
ExpiresByType text/css A2592000
ExpiresByType text/plain A2592000
ExpiresByType image/gif A2592000 
ExpiresByType image/jpg A2592000
ExpiresByType image/jpeg A2592000
ExpiresByType image/png A2592000
ExpiresByType image/bmp A2592000
ExpiresByType application/x-shockwave-flash A2592000
</IfModule>

# Rewrite rules.
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteRule ^$ /home/index.html [L]
RewriteRule ^(rss|atom)/?$ /$1.xml [L]
RewriteRule ^tags/([^/\.]+)/(rss|atom)/?$ /tags/$1/$2.xml [L]
RewriteRule ^(articles|blog|entries|tags)/?$ /archives/ [L,R=301]
RewriteRule ^articles/view/([^/\.]+)/?$ /articles/$1/ [L,R=301]
RewriteRule ^(blog|entries)/([^/\.]+)/?$ /articles/$2/ [L,R=301]
</IfModule>