~kosova/+junk/tuxfamily-twiki

« back to all changes in this revision

Viewing changes to foswiki/pub-htaccess.txt

  • Committer: James Michael DuPont
  • Date: 2009-07-18 19:58:49 UTC
  • Revision ID: jamesmikedupont@gmail.com-20090718195849-vgbmaht2ys791uo2
added foswiki

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# Sample '.htaccess' file for 'pub' subdirectory
 
2
 
 
3
# Controls access to Foswiki 'pub' subdirectory - copy this into 'pub', 
 
4
# naming it '.htaccess', to have Apache use it.
 
5
 
 
6
# This is useful if you install Foswiki on a web host, or an intranet host
 
7
# where you can't edit the Apache http.conf file.  If you can edit the
 
8
# http.conf file, just set the 'Allow from all' there (or locate these
 
9
# directories outside the Web-visible directory tree.)
 
10
 
 
11
# Allow all access
 
12
Allow from all
 
13
 
 
14
# Deny people from looking at the index
 
15
# Bare in mind that this is largely inadequate
 
16
# See http://foswiki.org/System/AccessControl#Controlling_access_to_Attachment
 
17
# and http://foswiki.org/Tasks/Item610
 
18
# If you think you have a solution it is in your best interests to share it 
 
19
# so others can test your idea.
 
20
Options None
 
21
 
 
22
# We need to protect the entire pub directory tree against any kind of script execution
 
23
# Foswiki has a renaming protection scheme that alters certain file names to prevent
 
24
# script execution but it may not be 100% safe only to rely on this. The safest
 
25
# protection is to disabled all scripting.
 
26
 
 
27
# If you have PHP4 or PHP5 installed as Apache module make sure the directive below is enabled
 
28
# If you do not have PHP installed you will need to comment out the directory below
 
29
# to avoid errors.
 
30
# If PHP is installed as CGI this flag is not needed and will in fact make Apache fail 
 
31
php_flag engine off
 
32
 
 
33
# If you have PHP3 installed as Apache module make sure the directive below is enabled
 
34
# If PHP is installed as CGI this flag is not needed and will in fact make Apache fail
 
35
#php3_engine off
 
36
 
 
37
# This line will redefine the mime type for the most common types of scripts
 
38
AddType text/plain .shtml .php .php3 .phtml .phtm .pl .py .cgi
 
39
 
 
40
#for TWikiCompatibility - or even to make 'attachment not found's more user friendly
 
41
ErrorDocument 404 /foswiki/bin/viewfile
 
42
 
 
43
#add an Expires header that is sufficiently in the future that the browser does not even ask if its uptodate
 
44
# reducing the load on the server significantly
 
45
#IF you can, you should enable this - it _will_ improve your foswiki experience, even if you set it to under one day.
 
46
#LoadModule expires_module libexec/httpd/mod_expires.so
 
47
#AddModule mod_expires.c
 
48
#<ifmodule mod_expires.c>
 
49
#  <filesmatch "\.(jpg|gif|png|css|js)$">
 
50
#       ExpiresActive on
 
51
#       ExpiresDefault "access plus 11 days"
 
52
#   </filesmatch>
 
53
#</ifmodule>
 
54
#Add ETags too
 
55
FileETag MTime Size