2011-12-14 3 views
-1

ギャラリー/ 2/image.jpgにアクセスしようとしていますが、Kohanaは経路を考えて「URIルートギャラリーを見つけることができません」私のギャラリー/ dirのようなKohanaのルートをオフ/除外

特定のディレクトリ/ルート名のために私はどうすれば画像にアクセスできますか?

+0

途中でkohana 3.0,3.1、または3.2を使用していますか? –

+0

あなたの '.htaccess'が、URLを処理せずにファイルを提供するように正しく設定されていて、まだこれが起こっていると、あなたのURLは間違っている可能性があります。 – alex

答えて

0

あなたの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] 

ようになるはずです。

+0

まだエラーが発生していない – Karem

+0

最後の書き換えルールの上に追加した行でもう一度試してください。これは、要求URIに「ギャラリー」という単語が含まれていない限り、索引付けするように指示します。 –

関連する問題