๐Ÿ“ฆ rbri / escher-cms

๐Ÿ“„ .htaccess ยท 115 lines
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
115DirectoryIndex index.php
Options -Indexes +FollowSymLinks
AddDefaultCharset UTF-8
AcceptPathInfo On
ErrorDocument 403 /index.php

<IfModule mod_php5.c>
   php_flag register_globals off
   php_flag magic_quotes_gpc off
   php_flag short_open_tag on
</IfModule>

<IfModule mod_rewrite.c>
   RewriteEngine On
#   RewriteBase /escher

################################################################################
#
#   Uncomment this block of rules for static file caching.
#
#
#   Replace all occurrences of "my.fqdn.com" with the fully qualified domain
#   name of your production site.
#
#
#   RewriteCond %{SERVER_NAME} ^my\.fqdn\.com$
#   RewriteCond %{REQUEST_METHOD} ^GET$
#   RewriteCond %{DOCUMENT_ROOT}/cache/pages%{REQUEST_URI} -f
#   RewriteRule ^(.*)$ /cache/pages/$1 [L]
#
#   RewriteCond %{SERVER_NAME} ^my\.fqdn\.com$
#   RewriteCond %{REQUEST_METHOD} ^GET$
#   RewriteCond %{DOCUMENT_ROOT}/cache/pages%{REQUEST_URI}.html -f
#   RewriteRule ^(.*)$ /cache/pages/$1.html [L]
#
#   RewriteCond %{SERVER_NAME} ^my\.fqdn\.com$
#   RewriteCond %{REQUEST_METHOD} ^GET$
#   RewriteCond %{DOCUMENT_ROOT}/cache/pages%{REQUEST_URI} -d
#   RewriteCond %{DOCUMENT_ROOT}/cache/pages%{REQUEST_URI}index.html -f
#   RewriteRule ^(.*)$ /cache/pages/$1index.html [L]
#
#
#   Replace all occurrences of "staging.my.fqdn.com" with the fully qualified
#   domain name of your staging site.
#
#
#   RewriteCond %{SERVER_NAME} ^staging\.my\.fqdn\.com$
#   RewriteCond %{REQUEST_METHOD} ^GET$
#   RewriteCond %{DOCUMENT_ROOT}/cache/pages.staging%{REQUEST_URI} -f
#   RewriteRule ^(.*)$ /cache/pages.staging/$1 [L]
#
#   RewriteCond %{SERVER_NAME} ^staging\.my\.fqdn\.com$
#   RewriteCond %{REQUEST_METHOD} ^GET$
#   RewriteCond %{DOCUMENT_ROOT}/cache/pages.staging%{REQUEST_URI}.html -f
#   RewriteRule ^(.*)$ /cache/pages.staging/$1.html [L]
#
#   RewriteCond %{SERVER_NAME} ^staging\.my\.fqdn\.com$
#   RewriteCond %{REQUEST_METHOD} ^GET$
#   RewriteCond %{DOCUMENT_ROOT}/cache/pages.staging%{REQUEST_URI} -d
#   RewriteCond %{DOCUMENT_ROOT}/cache/pages.staging%{REQUEST_URI}index.html -f
#   RewriteRule ^(.*)$ /cache/pages.staging/$1index.html [L]
#
#
#   Replace all occurrences of "dev.my.fqdn.com" with the fully qualified
#   domain name of your development site.
#
#
#   RewriteCond %{SERVER_NAME} ^dev\.my\.fqdn\.com$
#   RewriteCond %{REQUEST_METHOD} ^GET$
#   RewriteCond %{DOCUMENT_ROOT}/cache/pages.dev%{REQUEST_URI} -f
#   RewriteRule ^(.*)$ /cache/pages.dev/$1 [L]
#
#   RewriteCond %{SERVER_NAME} ^dev\.my\.fqdn\.com$
#   RewriteCond %{REQUEST_METHOD} ^GET$
#   RewriteCond %{DOCUMENT_ROOT}/cache/pages.dev%{REQUEST_URI}.html -f
#   RewriteRule ^(.*)$ /cache/pages.dev/$1.html [L]
#
#   RewriteCond %{SERVER_NAME} ^dev\.my\.fqdn\.com$
#   RewriteCond %{REQUEST_METHOD} ^GET$
#   RewriteCond %{DOCUMENT_ROOT}/cache/pages.dev%{REQUEST_URI} -d
#   RewriteCond %{DOCUMENT_ROOT}/cache/pages.dev%{REQUEST_URI}index.html -f
#   RewriteRule ^(.*)$ /cache/pages.dev/$1index.html [L]
#
################################################################################

   RewriteCond %{REQUEST_FILENAME} !-f
   RewriteCond %{REQUEST_FILENAME} !-d
   RewriteCond %{REQUEST_FILENAME} !-l
   RewriteCond %{REQUEST_URI} !^/favicon.ico
   RewriteRule ^(.*) index.php [L]
</IfModule>

################################################################################
#
#   If using static file caching, enable browser-side caching by uncommenting.
#
#FileETag none
#
#<IfModule mod_headers.c>
#   Header unset ETag
#
#   <Files *.html>
#      Header append Cache-Control "max-age=0, no-cache, must-revalidate"
#   </Files>
#</IfModule>
#
#<IfModule mod_expires.c>
#   ExpiresActive On
#   ExpiresByType image/* "access plus 7 day"
#   ExpiresByType text/css "access plus 7 day"
#   ExpiresByType application/x-javascript "access plus 7 day"
#</IfModule>
#
################################################################################