-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy path.htaccess
More file actions
58 lines (45 loc) · 1.67 KB
/
Copy path.htaccess
File metadata and controls
58 lines (45 loc) · 1.67 KB
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
#DON'T SHOW DIRECTORY LISTINGS
Options -Indexes
#FOLLOW SYMBOLIC LINKS
Options +FollowSymLinks -Indexes
#SET DEFAULT HANDLER
DirectoryIndex index.html index.htm
RewriteEngine on
#WWW REWRITE
RewriteCond %{HTTPS_HOST} ^londoncomedylunch\.com$ [NC]
RewriteRule ^(.*)$ https://www.londoncomedylunch.com/$1 [L,R=301]
#REDIRECT OLD PAGE
RewriteCond %{HTTPS_HOST} ^www.londoncomedylunch.com$
RewriteRule ^old-page.html$ https://www.londoncomedylunch.com/new-page [R=301,L]
#ERROR 404 PAGE
ErrorDocument 404 /404.html
RewriteEngine On
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://www.londoncomedylunch.com/$1 [R,L]
<IfModule mod_expires.c>
ExpiresActive On
# Images
ExpiresByType image/jpeg "access plus 1 year"
ExpiresByType image/gif "access plus 1 year"
ExpiresByType image/png "access plus 1 year"
ExpiresByType image/webp "access plus 1 year"
ExpiresByType image/svg+xml "access plus 1 year"
ExpiresByType image/x-icon "access plus 1 year"
# Video
ExpiresByType video/webm "access plus 1 year"
ExpiresByType video/mp4 "access plus 1 year"
ExpiresByType video/mpeg "access plus 1 year"
# Fonts
ExpiresByType font/ttf "access plus 1 year"
ExpiresByType font/otf "access plus 1 year"
ExpiresByType font/woff "access plus 1 year"
ExpiresByType font/woff2 "access plus 1 year"
ExpiresByType application/font-woff "access plus 1 year"
# CSS, JavaScript
ExpiresByType text/css "access plus 1 month"
ExpiresByType text/javascript "access plus 1 month"
ExpiresByType application/javascript "access plus 1 month"
# Others
ExpiresByType application/pdf "access plus 1 month"
ExpiresByType image/vnd.microsoft.icon "access plus 1 year"
</IfModule>