-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.htaccess
143 lines (112 loc) · 4.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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
# The next config is a combination of html5boilerplate.com website code
# and Magento config plus additonal code I added specific for ZeroG
<IfModule mod_php5.c>
### set a default memory limit
php_value memory_limit 16M
### and execution time in seconds
php_value max_execution_time 10
### disable magic quotes
php_flag magic_quotes_gpc off
### enable resulting html compression
#php_flag zlib.output_compression on
### turn off compatibility with PHP4 when dealing with objects
php_flag zend.ze1_compatibility_mode Off
</IfModule>
<IfModule mod_deflate.c>
### Filter all content
#SetOutputFilter DEFLATE
### Or specific types only
AddOutputFilterByType DEFLATE text/html text/plain text/css application/json
AddOutputFilterByType DEFLATE text/javascript application/javascript application/x-javascript
AddOutputFilterByType DEFLATE text/xml application/xml text/x-component
### webfonts and svg:
<FilesMatch "\.(ttf|otf|eot|svg)$" >
SetOutputFilter DEFLATE
</FilesMatch>
### Netscape 4.x has some problems...
#BrowserMatch ^Mozilla/4 gzip-only-text/html
### Netscape 4.06-4.08 have some more problems
#BrowserMatch ^Mozilla/4\.0[678] no-gzip
### MSIE masquerades as Netscape, but it is fine
#BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
### Don't compress images
#SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png)$ no-gzip dont-vary
### Make sure proxies don't deliver the wrong content
#Header append Vary User-Agent env=!dont-vary
</IfModule>
<IfModule mod_rewrite.c>
### enable url rewrites
Options +FollowSymLinks
RewriteEngine on
### set the rewrite base, if necesary (this is case sensitive)
#RewriteBase /zerog/
### allow fetching of public files
RewriteCond %{REQUEST_URI} !^/(media|skin|js)/
### no rewrite for existing files/links/directories
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-l
### rewrite everything to index.php
### add a / (slash) before index.php if it does not work on Linux
### or uncomment the RewriteBase property
#RewriteRule ^(.+)$ index.php?path=$1 [NC,L]
RewriteRule .* index.php [L]
</IfModule>
<IfModule mod_expires.c>
### Add default Expires header
### http://developer.yahoo.com/performance/rules.html#expires
##3 For the moment apply it only to assets, and for 3 months
### Uncomment the following lines to enable it
#Header set Cache-Control "public"
#ExpiresActive on
#ExpiresDefault "access plus 1 month"
#ExpiresByType text/cache-manifest "access plus 0 seconds"
#ExpiresByType text/html "access plus 0 seconds"
#ExpiresByType text/xml "access plus 0 seconds"
#ExpiresByType application/xml "access plus 0 seconds"
#ExpiresByType application/json "access plus 0 seconds"
#ExpiresByType application/rss+xml "access plus 1 hour"
#ExpiresByType image/vnd.microsoft.icon "access plus 1 week"
# media
#ExpiresByType image/gif "access plus 1 month"
#ExpiresByType image/png "access plus 1 month"
#ExpiresByType image/jpg "access plus 1 month"
#ExpiresByType image/jpeg "access plus 1 month"
#ExpiresByType video/ogg "access plus 1 month"
#ExpiresByType audio/ogg "access plus 1 month"
#ExpiresByType video/mp4 "access plus 1 month"
#ExpiresByType video/webm "access plus 1 month"
### webfonts
#ExpiresByType font/truetype "access plus 1 month"
#ExpiresByType font/opentype "access plus 1 month"
#ExpiresByType font/woff "access plus 1 month"
#ExpiresByType image/svg+xml "access plus 1 month"
#ExpiresByType application/vnd.ms-fontobject "access plus 1 month"
### css and javascript
#ExpiresByType text/css "access plus 1 month"
#ExpiresByType application/javascript "access plus 1 month"
#ExpiresByType text/javascript "access plus 1 month"
### Or you coud also use the FilesMatch tag
#<FilesMatch "\.(ico|pdf|flv|jpg|jpeg|png|gif|js|css|swf)$">
# ExpiresActive On
# ExpiresDefault "access plus 3 months"
#</FilesMatch>
</IfModule>
AddDefaultCharset UTF-8
### if you need to process access with a htpasswd file, uncomment the line below
Order allow,deny
Allow from all
#AuthType Basic
#AuthName "Access restricted"
#AuthUserFile /my/custom/path/to/.htpasswd
#Require valid-user
### Disable ETags if you're using far expires
### http://developer.yahoo.com/performance/rules.html#etags
#FileETag None
### Hide the server signature so people don't know you're running Apache
ServerSignature Off
### Custom 404 error page
#ErrorDocument 404 /404.html
### Set ZEROG code and type of website to execute
#SetEnv ZEROG_RUN_CODE "test"
#SetEnv ZEROG_RUN_TYPE "website_view"