View difference between Paste ID: JPQXUv9P and 1cUF1eGs
SHOW: | | - or go back to the newest paste.
1
2
# -- NSM .htaccess Generator Start --
3
# .htaccess generated by NSM .htaccess Generator v1.0.5
4
# @see: http://ee-garage.com/nsm-htaccess-generator
5
6
# secure .htaccess file
7
<Files .htaccess>
8
 order allow,deny
9
 deny from all
10
</Files>
11
12
# EE 404 page for missing pages
13
ErrorDocument 404 /404/index
14
15
FileETag None
16
17-
	# (Google Adwords) Catch any Google campaigns directed to the home page
17+
18-
	RewriteCond %{REQUEST_URI} ^/$
18+
19-
	RewriteCond %{QUERY_STRING} ^(utm_source=.*)
19+
20-
	RewriteRule ^(.*)$ /index.php? [L,PT]
20+
21
	RewriteRule ^(.*)$ http://www.example.com$1 [R=301,L]
22
23
	# Uncomment to Remove www, but comment the above 2 lines out. 
24
	# Otherwise the world will end
25
	# RewriteCond %{HTTP_HOST} ^www.example.com$ [NC]
26
	# RewriteRule ^(.*)$ http://example.com$1 [R=301,L]
27
	
28
# (Google Adwords) Catch any Google campaigns directed to the home page
29
RewriteCond %{REQUEST_URI} ^/$
30
RewriteCond %{QUERY_STRING} ^(utm_source=.*)
31
RewriteRule ^(.*)$ /index.php? [L,PT]
32
33
34
	# Removes index.php
35
	RewriteCond $1 !\.(gif|jpe?g|png)$ [NC]
36
	RewriteCond %{REQUEST_FILENAME} !-f
37
	RewriteCond %{REQUEST_FILENAME} !-d
38
	#RewriteRule ^(.*)$ /index.php/$1 [L]
39
	RewriteRule ^(.*)$ /index.php?/$1 [L]
40
	# If 404s or "No Input File" errors, or every page give the same thing
41
	# make it /index.php?/$1 above -- Just adding the question mark
42
</IfModule>
43
44
<IfModule mod_expires.c>
45
	ExpiresActive On
46
	ExpiresByType text/html "access plus 1 second"
47
	ExpiresByType text/css "access plus 1 month"
48
	ExpiresByType image/gif "access plus 1 month"
49
	ExpiresByType image/png "access plus 1 month"
50
	ExpiresByType image/jpg "access plus 1 month"
51
	ExpiresByType image/jpeg "access plus 1 month"
52
	ExpiresByType text/javascript "access plus 1 month"
53
	ExpiresByType application/pdf "access plus 1 month"
54
	ExpiresByType application/x-download "access plus 1 month"
55
	ExpiresByType application/x-javascript "access plus 1 month"
56
	ExpiresByType application/x-shockwave-flash "access plus 1 month"
57
</IfModule>
58
59
# ----------------------------------------------------------------------
60
# Better website experience for IE users
61
# ----------------------------------------------------------------------
62
63
# Force the latest IE version, in various cases when it may fall back to IE7 mode
64
#  github.com/rails/rails/commit/123eb25#commitcomment-118920
65
# Use ChromeFrame if it's installed for a better experience for the poor IE folk
66
67
<IfModule mod_setenvif.c>
68
  <IfModule mod_headers.c>
69
    BrowserMatch MSIE ie
70
    Header set X-UA-Compatible "IE=Edge,chrome=1" env=ie
71
		Header set X-UA-Compatible "IE=EmulateIE7, IE=9"
72
		Header set imagetoolbar "no"
73
  </IfModule>
74
</IfModule>
75
76
<IfModule mod_headers.c>
77
# Because X-UA-Compatible isn't sent to non-IE (to save header bytes),
78
#   We need to inform proxies that content changes based on UA
79
  Header append Vary User-Agent
80
# Cache control is set only if mod_headers is enabled, so that's unncessary to declare
81
</IfModule>
82
83
Options +FollowSymLinks
84
RewriteEngine on
85
RewriteRule \.swf$ - [E=no-gzip:1]