-1
Im试图访问画廊/ 2/image.jpg,但Kohana认为它的路线,所以它返回一个错误“无法找到URI路线画廊”在Kohana关闭/排除路线,例如我的画廊/目录
那么如何关闭特定的目录/路由名称,以便我可以访问图像?
Im试图访问画廊/ 2/image.jpg,但Kohana认为它的路线,所以它返回一个错误“无法找到URI路线画廊”在Kohana关闭/排除路线,例如我的画廊/目录
那么如何关闭特定的目录/路由名称,以便我可以访问图像?
你htaccess的应该是这个样子
# Turn on URL rewriting
RewriteEngine On
# Installation directory
RewriteBase/
# Protect hidden files from being viewed
<Files .*>
Order Deny,Allow
Deny From All
</Files>
# Protect application and system files from being viewed
RewriteRule ^(?:application|modules|system)\b.* index.php/$0 [L]
# Allow any files or directories that exist to be displayed directly
RewriteCond ${REQUEST_URI} ^.+$
RewriteCond %{REQUEST_FILENAME} \.(gif|jpe?g|png|pdf)$ [OR]
RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d [OR]
RewriteCond %{REQUEST_FILENAME} -l
RewriteRule^- [L]
# Rewrite all other URLs to index.php/URL
RewriteCond ${REQUEST_URI} ^!galleries/.*$
RewriteRule .* index.php/$0 [PT]
应该被发送到路由引擎排除。
你使用kohana 3.0,3.1或3.2的方式? – 2011-12-14 00:53:12
如果您的`.htaccess`设置正确,以便在不处理URL的情况下提供文件并且仍然存在,则您的URL可能不正确。 – alex 2011-12-14 00:53:36