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
|
<IfModule mod_cgi.c>
<IfModule !mod_fcgid.c>
AddHandler cgi-script .lua
</IfModule>
</IfModule>
<IfModule mod_fcgid.c>
AddHandler fcgid-script .lua
FCGIWrapper "/usr/bin/env wsapi.fcgi" .lua
</IfModule>
<FilesMatch "\.(lua|db|sql|mysql|cgi|fcgi)$">
Deny from all
Allow from none
</FilesMatch>
<Files "blog.lua">
Allow from all
Deny from none
<IfModule mod_xsendfile.c>
XSendFile on
</IfModule>
</Files>
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} ^(.*)/blog\.lua$
RewriteCond %1/page_cache/index.html -f
RewriteRule ^blog\.lua/?$ page_cache/index.html [L]
RewriteCond %{REQUEST_FILENAME} ^(.*)/blog\.lua$
RewriteCond %1/page_cache/post-$1.html -f
RewriteRule ^blog\.lua/post/(.+)$ page_cache/post-$1.html [L]
RewriteCond %{REQUEST_FILENAME} ^(.*)/blog\.lua$
RewriteCond %1/page_cache/archive-$1-$2.html -f
RewriteRule ^blog\.lua/archive/([^/]+)/([^/]+)$ page_cache/archive-$1-$2.html [L]
RewriteCond %{REQUEST_FILENAME} ^(.*)/blog\.lua$
RewriteCond %1/page_cache/page-$1.html -f
RewriteRule ^blog\.lua/page/(.+)$ page_cache/page-$1.html [L]
</IfModule>
|