af90e74e |
1 | # On some PHP servers it may help if this file is copied |
a9858957 |
2 | # to the main moodle directory and renamed .htaccess |
af90e74e |
3 | # |
04ad372d |
4 | # As soon as you do this, check your web site. Is it |
5 | # still working OK? If you are getting a "configuration |
6 | # error" then you may need to enable overrides by editing |
7 | # the main httpd.conf for Apache and in the main server |
8 | # or virtual server area, adding something like: |
9 | # |
10 | # <Directory /web/moodle> |
11 | # AllowOverride All |
12 | # </Directory> |
13 | # |
76a359ba |
14 | |
15 | ### Firstly, if you are using Apache 2, you need the following |
16 | ### three lines to allow Apache to pass a PATH_INFO variable |
17 | ### correctly for URLs like http://server/file.php/arg1/arg2 |
18 | |
19 | <IfDefine APACHE2> |
20 | AcceptPathInfo on |
21 | </IfDefine> |
22 | |
ac234d02 |
23 | ### Secondly, you can define the default files in the Moodle |
24 | ### directories as follows: |
76a359ba |
25 | |
ac234d02 |
26 | DirectoryIndex index.php index.html index.htm |
27 | |
28 | ### Thirdly, set up some PHP variables that Moodle needs |
04ad372d |
29 | |
a09b86a6 |
30 | php_value magic_quotes_gpc On |
31 | php_value magic_quotes_runtime Off |
32 | php_value file_uploads On |
33 | php_value short_open_tag On |
34 | php_value session.auto_start Off |
35 | php_value session.bug_compat_warn Off |
04ad372d |
36 | |
ac234d02 |
37 | |
96dad0de |
38 | ### These are optional - you may not want to override php.ini |
a09b86a6 |
39 | ### To enable them, remove the leading hash (#) |
04ad372d |
40 | |
af90e74e |
41 | #php_value upload_max_filesize 2M |
42 | #php_value post_max_size 2M |
a09b86a6 |
43 | #php_value session.gc_maxlifetime 7200 |
04ad372d |
44 | |
96dad0de |
45 | |
ac234d02 |
46 | ### You can change the following line to point to the |
47 | ### error/index.php file in your Moodle distribution. |
48 | ### It provides a form which emails you (the admin) |
49 | ### about 404 errors (URL not found). |
04ad372d |
50 | |
51 | #ErrorDocument 404 http://example.org/moodle/error/index.php |