This repository has been archived by the owner on Feb 28, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.htaccess
58 lines (45 loc) · 1.83 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
51
52
53
54
55
56
57
58
# Copyright 2017 Peter Beverloo. All rights reserved.
# Use of this source code is governed by the MIT license, a copy of which can
# be found in the LICENSE file.
RewriteEngine On
# Only allow the portals to be used from secured connections
Header set Strict-Transport-Security "max-age=31536000" env=HTTPS
# Force HTTPS
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
# Enable PHP errors and warnings
php_flag display_startup_errors on
php_flag display_errors on
php_flag html_errors on
php_value error_reporting -1
# Disallow access to .git and .gitignore entirely.
RedirectMatch 404 /\.git
RedirectMatch 404 /\.gitignore
# Disallow access to other files that don't have to be web-accessible.
RedirectMatch 404 /configuration/
RedirectMatch 404 /composer.json
RedirectMatch 404 /composer.lock
RedirectMatch 404 /gulpfile.js
RedirectMatch 404 /node_modules/
RedirectMatch 404 /package.json
RedirectMatch 404 /phpcs.xml
RedirectMatch 404 /phpunit.xml
# These files will be generated based on the environment and needs.
RewriteRule ^manifest.json$ /manifest.php [L]
RewriteRule ^anime-legacy.js$ /scripts/aggregated.php [L]
# URLs used by the client-side application.
RewriteRule ^(events|floors|stewards|volunteers)/ / [L]
# Disable caching for the content package.
<FilesMatch "\.(css|js|json)">
FileETag None
Header set Cache-Control "max-age=0, no-cache, no-store, must-revalidate"
Header set Pragma "no-cache"
Header set Expires "Fri, 9 Jun 1989 01:00:00 GMT"
</FilesMatch>
# Vanity URLs for the tools hosted on these domains.
RewriteRule ^hallo$ /hallo/ [R=301]
RewriteRule ^hello$ /hello/ [R=301]
RewriteRule ^schedule$ /schedule/ [R=301]
RewriteRule ^schedule/?(.*) /tools/schedule/$1 [L]
RewriteRule ^scheduler$ /scheduler/ [R=301]
RewriteRule ^scheduler/?(.*) /tools/event-scheduling-calculator/$1 [L]