This repository has been archived by the owner on Dec 14, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
htaccess
58 lines (47 loc) · 1.79 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
# Don't show directory listings for URLs which map to a directory.
Options -Indexes
# Follow symbolic links in this directory.
Options +FollowSymLinks
# Rewrite URLs - Removes the ".php" on all file extensions.
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([^\.]+)$ $1.php [NC,L]
# Error Documents - Redirects to the index page.
# 400: Bad Request
ErrorDocument 400 /
# 401: Authorization Required
ErrorDocument 401 /
# 403: Forbidden
ErrorDocument 403 /
# 404: Not Found
ErrorDocument 404 /
# 500: Internal Server Error
ErrorDocument 500 /
# Compression - Think of a zip file being sent to the browser from the server.
AddOutputFilterByType DEFLATE text/plain
AddOutputFilterByType DEFLATE text/html
AddOutputFilterByType DEFLATE text/xml
AddOutputFilterByType DEFLATE text/css
AddOutputFilterByType DEFLATE application/xml
AddOutputFilterByType DEFLATE application/xhtml+xml
AddOutputFilterByType DEFLATE application/rss+xml
AddOutputFilterByType DEFLATE application/javascript
AddOutputFilterByType DEFLATE application/x-javascript
## Everything Below is for Enhanced SEO ##
# Specify a character set
AddDefaultCharset UTF-8
# Expire Cache
ExpiresActive On
ExpiresByType image/jpg "access plus 1 year"
ExpiresByType image/jpeg "access plus 1 year"
ExpiresByType image/gif "access plus 1 year"
ExpiresByType image/png "access plus 1 year"
ExpiresByType text/css "access plus 1 month"
ExpiresByType application/pdf "access plus 1 month"
ExpiresByType application/javascript "access plus 1 month"
ExpiresByType application/x-javascript "access plus 1 month"
ExpiresByType text/x-javascript "access plus 1 month"
ExpiresDefault "access plus 10 days"
# Set Last Modified - This may or may not be a fake date.
Header set Last-Modified "Mon, 31 Aug 2009 00:00:00 GMT"