-
Notifications
You must be signed in to change notification settings - Fork 10
/
.htaccess
30 lines (25 loc) · 681 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
# Add caching
<FilesMatch ".(jpg|jpeg|png|gif|js)$">
Header set Cache-Control "max-age=3600"
</FilesMatch>
# Prevent viewing of htaccess
<Files .htaccess>
order allow,deny
deny from all
</Files>
# Force HTTPS
RewriteEngine On
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://howtotarget.email/$1 [R,L]
# Prevent directory listings
Options All -Indexes
# Don't require .html extension
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME}\.html -f
RewriteRule ^(.*)$ $1.html
# Don't require .php extension
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME}\.php -f
RewriteRule ^(.*)$ $1.php