【发布时间】:2011-06-30 09:36:57
【问题描述】:
在Kohana 中有modules -.htaccess 中的路径保护
# Protect application and system files from being viewed
RewriteRule ^(?:application|modules|system)\b.* index.php/$0 [L]
我怎么能允许这样的路径:
http://localhost/modules/mymodule/media/js/myjavascript.js
我想在我的模块中包含 javascript 和其他媒体文件,并且仍然保护其他模块文件,例如 .php
我可以允许整个modules -path,但是所有.php -files 也会被列出。
# Protect application and system files from being viewed
RewriteRule ^(?:application|system)\b.* index.php/$0 [L]
当然有基本的 PHP 保护,但我仍然不希望任何人列出我的 modules 路径。
<?php defined('SYSPATH') or die('No direct script access.');
【问题讨论】:
标签: .htaccess mod-rewrite module kohana