forked from kohler/hotcrp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.htaccess
50 lines (40 loc) · 1.6 KB
/
.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
# Apache settings for HotCRP
# These directives limit how large a paper can be uploaded.
# post_max_size should be >= upload_max_filesize.
#php_value upload_max_filesize 15M
#php_value post_max_size 20M
# Some pages involve a lot of post variables.
#php_value max_input_vars 4096
# A large memory_limit helps when sending very large zipped files.
php_value memory_limit 128M
# Default to UTF-8 (most scripts will override this with <meta>).
AddDefaultCharset UTF-8
# Use index.php for directory access.
DirectoryIndex index.php
# Prevent access to SCM directory, logs, test, README, regardless of case.
RedirectMatch 403 ^.*/(\..*|[Rr][Ee][Aa][Dd][Mm][Ee].*|[Ff][Ii][Ll][Ee][Ss][Tt][Oo][Rr][Ee]|[Dd][Oo][Cc][Ss]|[Cc][Oo][Nn][Ff]|[Cc][Oo][Dd][Ee]|[Ll][Oo][Gg][Ss])($|/.*$)
# Don't use MultiViews, which can conflict with mod_rewrite suffixless URLs.
Options -MultiViews
# Add .php to suffixless URLs.
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteBase /
RewriteCond %{REQUEST_FILENAME}.php -f
RewriteCond %{REQUEST_URI} ^(.*)$
RewriteRule ^[^/]*$ %1.php [L,NE]
RewriteCond %{REQUEST_FILENAME}.php -f
RewriteCond %{REQUEST_URI},,$1,, ^(.*)(.*,,)\2$
RewriteRule ^[^/]*(/.*)$ %1.php$1 [L,NE]
</IfModule>
# Uncomment this line to ONLY grant access via https. Requires mod_ssl.
#
# SSLRequireSSL
# HTTP Authentication: To ask the server to authenticate users,
# uncomment these lines and set $Opt["httpAuthLogin"] in
# conf/options.php. The $Opt["httpAuthLogin"] value should correspond
# to your AuthType and AuthName (AuthName is the "realm").
#
# AuthType Basic
# AuthName "HotCRP"
# AuthUserFile FILENAME
# Require valid-user