Permalink
Browse files

禁止对md文件的访问

  • Loading branch information...
1 parent 7ae097b commit d55d7cdf47a9b6b8f58fddc4fcbe8884eea76c58 @hjue committed Aug 14, 2014
Showing with 6 additions and 1 deletion.
  1. +4 −0 .htaccess
  2. +2 −1 config.yaml
View
@@ -1,3 +1,7 @@
+<Files ~ "\.md$">
+order allow,deny
+deny from all
+</files>
RewriteEngine on
RewriteCond $1 !^(index\.php|images|posts|templates|robots\.txt)
RewriteRule ^(.*)$ /index.php/$1 [L]
View
@@ -3,4 +3,5 @@ version: 1
handle:
- - rewrite: if( !is_file() && path ~ "^(.*)$" ) goto "/index.php/$1"
+ - rewrite: if( !is_file() && path ~ "^(.*)$" ) goto "/index.php/$1"
+ - hostaccess: if(path ~ "\.md$") allow "127.0.0.1"

0 comments on commit d55d7cd

Please sign in to comment.