~quam-plures-core/quam-plures/qp5_final_branch

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
# Apache configuration for the blog folder
# Lines starting with "# " are comments
# Lines starting with "#" (no space) are directives commented out

# PHP SECURITY:
# This will make register globals off in the QP directory
<IfModule mod_php5.c>
	php_flag register_globals off
</IfModule>

# DEFAULT DOCUMENT TO DISPLAY:
# This will select the default file name to be displayed if
# the URL does not provide one (ex http://domain.com/foo/)
<IfModule mod_dir.c>
	DirectoryIndex index.php index.html
</IfModule>

# Improve pagespeed score by leveraging browser caching
<IfModule mod_expires.c>
	ExpiresActive On
	# default is one week for anything not covered
	ExpiresDefault A604800
	# 1 month - possible to be changed, unlikely
	<FilesMatch "\.(jpg|jpeg|png|gif|swf|txt|xml|js|css)$">
		ExpiresDefault A2419200
	</FilesMatch>
	# 1 year - doesn't change often
	<FilesMatch "\.(flv|ico|pdf|avi|mov|ppt|doc|mp3|wmv|wav|ttf|otf|woff)$">
		ExpiresDefault A29030400
	</FilesMatch>
</IfModule>

# Force no caching for admin pages
<filesMatch "^admin\.php.*$">
ExpiresActive Off
Header set Cache-Control "private, no-cache, no-store, proxy-revalidate, no-transform"
Header set Pragma "no-cache"
</filesMatch>

# Improve pagespeed by compressing text/html/javascript/css/xml files
AddOutputFilterByType DEFLATE text/plain
AddOutputFilterByType DEFLATE text/html
AddOutputFilterByType DEFLATE text/xml
AddOutputFilterByType DEFLATE text/css
AddOutputFilterByType DEFLATE application/xml
AddOutputFilterByType DEFLATE application/xhtml+xml
AddOutputFilterByType DEFLATE application/rss+xml
AddOutputFilterByType DEFLATE application/javascript
AddOutputFilterByType DEFLATE application/x-javascript

# Block ?disp=url_spammers
RewriteEngine On
RewriteCond %{QUERY_STRING} disp=http [NC]
RewriteRule .* - [F]

<Files 403.shtml>
order allow,deny
allow from all
</Files>

# CLEAN URLS:
# If you're using Apache 2, you may wish to try this if clean URLs don't work:
#AcceptPathInfo	On

# PHP5:
# This may need to be in each folder:
#AddHandler application/x-httpd-php5 .php

# CATCH EVERYTHING INTO QP:
# The following will allow you to have URL right off the site root,
# using index.php as a stub but not showing it. This will add
# support for URLs like:  http://example.com/2006/08/29/post-title

# This line may be needed:
#RewriteBase /
# Redirect anything that's not an existing directory or file to index.php:
#RewriteCond %{REQUEST_FILENAME} !-d
#RewriteCond %{REQUEST_FILENAME} !-f
#RewriteRule ^  index.php