-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy path.htaccess
executable file
·38 lines (30 loc) · 1012 Bytes
/
.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
<Files ~ "media/.+$">
SetHandler default-handler
</Files>
# AddHandler fastcgi-script .fcgi
AddHandler cgi-script .py
RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} ^users.wpi.edu$
RewriteRule ^(.*)$ http://lnl.wpi.edu/$1 [L,R=301]
RewriteRule ^(~lnl/.*)$ http://lnl.wpi.edu/$1 [L,R=301]
RewriteRule ^(/~lnl/.*)$ http://lnl.wpi.edu/$1 [L,R=301]
RewriteRule ^(media/.*)$ - [L]
RewriteRule ^(static/.*)$ - [L]
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://lnl.wpi.edu/$1 [L,R]
## EXPIRES CACHING ##
<IfModule mod_expires.c>
ExpiresActive On
ExpiresByType image/jpg "access 1 day"
ExpiresByType image/jpeg "access 1 day"
ExpiresByType image/gif "access 1 day"
ExpiresByType image/png "access 1 day"
ExpiresByType text/css "access 1 hour"
ExpiresByType text/x-javascript "access 1 hour"
ExpiresByType image/x-icon "access 1 day"
</IfModule>
## EXPIRES CACHING ##
# Wait until we confirm everything is working before we try anything.
PassengerEnabled On
# PassengerAppRoot /home/lnl/lnldb