-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.htaccess
32 lines (27 loc) · 1.03 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
RewriteEngine on
# Fix "Specify a Vary: Accept-Encoding Header" error on Pingdom/Google tests"
<IfModule mod_headers.c>
<FilesMatch ".(js|css|xml|gz|html)$">
Header append Vary: Accept-Encoding
</FilesMatch>
</IfModule>
# allow .html and no .html to show same page
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME}\.html -f
RewriteRule ^(.*)$ $1.html
# redirect .html to no .html
RewriteCond %{THE_REQUEST} \.html
RewriteRule ^(.*)\.html$ /$1 [R=301,L]
# force https
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://scioly.princeton.edu/$1 [R,L]
# for archive page (no .html for index b/c of above rule)
Redirect 301 /past/2017/index https://scioly.princeton.edu/past/2017
# for root page
Redirect 301 /index https://scioly.princeton.edu
# php -- BEGIN cPanel-generated handler, do not edit
# Set the “ea-php81” package as the default “PHP” programming language.
<IfModule mime_module>
AddHandler application/x-httpd-ea-php81 .php .php8 .phtml
</IfModule>
# php -- END cPanel-generated handler, do not edit