forked from ionize/ionize
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.htaccess
executable file
·121 lines (104 loc) · 4.3 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
RewriteEngine On
# RewriteBase
# RewriteBase /
# Only needed for some hosts, if the front returns 403.
# Options +FollowSymlinks
# Memory Limit
# php_value memory_limit 256M
# php_value max_execution_time 18000
# Disable Hotlinking
# Replace "domain.tld" with your domain name
# Don't forget to add a picture "thepic.gif" on your server
# RewriteCond %{HTTP_REFERER} !^http://(.+\.)?domain\.tld/ [NC]
# RewriteCond %{HTTP_REFERER} !^$
# Solution 1 : Displays another picture from an URL
# RewriteRule .*\.(jpe?g|gif|bmp|png)$ http://www.domain.tld/thepic.gif [L]
# Solution 2 : Displays a 403 forbidden
# RewriteRule .*\.(jpe?g|gif|bmp|png)$ - [F]
# Redirect domain.com to www.domain.com
# RewriteCond %{HTTP_HOST} !^www\.domain\.tld$ [NC]
# RewriteRule ^(.*)$ http://www.domain.tld/$1 [QSA,L,R=301]
# Redirect www.domain.com to domain.com
# RewriteCond %{HTTP_HOST} !^domain.com$ [NC]
# RewriteRule ^(.*)$ http://domain.com/$1 [L,R=301]
# Disallow .svn access if you're using SVN
# RedirectMatch 404 /\\.svn(/.*|$)
# Uncomment these lines to display the off.html page to other IP than the one bellow
# RewriteCond %{REMOTE_ADDR} !^127.0.0.1$
# RewriteCond %{REQUEST_FILENAME} !-f
# RewriteRule ^(.*) off.html
# Content type expiration
# Activate on live website
#<IfModule mod_expires.c>
# ExpiresActive On
# ExpiresDefault "access plus 1 seconds"
# ExpiresByType image/x-icon "access plus 1 year"
# ExpiresByType image/jpeg "access plus 1 year"
# ExpiresByType image/png "access plus 1 year"
# ExpiresByType image/gif "access plus 1 year"
# ExpiresByType text/css "access plus 1 month"
# ExpiresByType text/javascript "access plus 1 month"
# ExpiresByType application/octet-stream "access plus 1 month"
# ExpiresByType application/x-javascript "access plus 1 month"
# ExpiresByType application/javascript "access plus 1 month"
#</IfModule>
# Content type max age
# Activate on live website
#<IfModule mod_headers.c>
# <FilesMatch "\\.(ico|jpe?g|png|gif|swf|woff)$">
# Header set Cache-Control "max-age=31536000, public"
# </FilesMatch>
# <FilesMatch "\\.(css)$">
# Header set Cache-Control "max-age=2692000, public"
# </FilesMatch>
# <FilesMatch "\\.(js)$">
# Header set Cache-Control "max-age=2692000, private"
# </FilesMatch>
# <FilesMatch "\.(js|css|xml|gz)$">
# Header append Vary: Accept-Encoding
# </FilesMatch>
# Header unset ETag
# Header append Cache-Control "public"
#</IfModule>
# Content type compression
# Activate on live website
#<IfModule mod_deflate.c>
# AddOutputFilterByType DEFLATE text/plain
# AddOutputFilterByType DEFLATE text/html
# AddOutputFilterByType DEFLATE text/xml
# AddOutputFilterByType DEFLATE text/css
# AddOutputFilterByType DEFLATE text/javascript
# AddOutputFilterByType DEFLATE application/xhtml+xml
# AddOutputFilterByType DEFLATE application/xml
# AddOutputFilterByType DEFLATE application/rss+xml
# AddOutputFilterByType DEFLATE application/javascript
# AddOutputFilterByType DEFLATE application/x-javascript
# AddOutputFilterByType DEFLATE application/x-httpd-php
# AddOutputFilterByType DEFLATE application/x-httpd-fastphp
# AddOutputFilterByType DEFLATE image/svg+xml
# SetOutputFilter DEFLATE
# Problematic browsers
# BrowserMatch ^Mozilla/4 gzip-only-text/html
# BrowserMatch ^Mozilla/4\.0[678] no-gzip
# BrowserMatch \bMSI[E] !no-gzip !gzip-only-text/html
# Don't compress images
# SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png)$ no-gzip dont-vary
# SetEnvIfNoCase Request_URI \.(?:exe|t?gz|zip|bz2|sit|rar)$ no-gzip dont-vary
# SetEnvIfNoCase Request_URI \.(?:pdf|avi|mov|mp3|mp4|rm)$ no-gzip dont-vary
# Make sure proxies don't deliver the wrong content
# Header append Vary User-Agent env=!dont-vary
#</IfModule>
# DO NOT MODIFY ANY FOLLOWING LINE
#
# Ionize Rules
#
# If Ionize resized outside the public folder, keep modules asset availability
# RewriteCond %{REQUEST_FILENAME} !-f
# RewriteRule ^(modules)/([a-zA-Z0-9-]+)/(assets)/(.*)$ ../$1/$2/$3/$4
# Keep these lines even in maintenance mode, to have an access to the website
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond $1 !^(index\.php|robots\.txt)
RewriteRule ^(.*)$ index.php/$1
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(application|modules|plugins|system|themes) index.php/$1 [L]