2012-01-21 18 views
1

私のウェブサイトにmp3ファイルをスクリプトでアップロードしていますが、ダウンロードしようとするとHTML5プレーヤーで再生しようとします。htaccessサーバーにアップロードされたファイルを開くことができません

ダウンロードファイルのリンクは次のようになります。

http://test.entreplus.com/content/plugins/post_audio/uploadify-local/uploads/Mac.(Miller)!%20-%20Jerry's%20Record%20Store.mp3 

と私はそれをダウンロードしようとしているとき、それはメインページに私をリダイレクトします。

ライブサイトでのみ発生しますが、localhostでは正常に動作します。

誰かが私の.htaccessファイルを見て、そこに問題があるかどうかを知るのに十分な人でしょうか?

Options +Indexes +FollowSymlinks 
RewriteEngine on 

## Redirect www.example.com to example.com. Add ## if you don't need the redirect. 
RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC] 
RewriteRule ^(.*)$ http://%1/$1 [R=301,L] 

AddType application/x-shockwave-flash swf 

# BEGIN EXPIRES 
#cache html and htm files for one day 
<FilesMatch ".(html|htm)$"> 
Header set Cache-Control "max-age=43200" 
</FilesMatch> 

#cache css, javascript and text files for one week 
<FilesMatch ".(js|css|txt)$"> 
Header set Cache-Control "max-age=604800" 
</FilesMatch> 

#cache flash and images for one month 
<FilesMatch ".(flv|swf|ico|gif|jpg|jpeg|png)$"> 
Header set Cache-Control "max-age=2592000" 
</FilesMatch> 

#disable cache for script files 
<FilesMatch "\.(pl|php|cgi|spl|scgi|fcgi)$"> 
Header unset Cache-Control 
</FilesMatch> 
# END EXPIRES 

<IfModule mod_gzip.c> 
    mod_gzip_on Yes 
    mod_gzip_dechunk Yes 
    mod_gzip_item_include file \.(html?|txt|css|js|php|pl)$ 
    mod_gzip_item_include handler ^cgi-script$ 
    mod_gzip_item_include mime ^text\.* 
    mod_gzip_item_include mime ^application/x-javascript.* 
    mod_gzip_item_exclude mime ^image\.* 
    mod_gzip_item_exclude rspheader ^Content-Encoding:.*gzip.* 
</IfModule> 

##### CORE ADMIN ##### 
RewriteRule ^admin/?$ admin_index.php [L] 
RewriteRule ^admin/([a-zA-Z0-9_-]+)/?$ admin_index.php?page=$1 [L] 
RewriteRule ^admin/plugin_settings/plugin/([a-zA-Z0-9_-]+)/?$ admin_index.php?page=plugin_settings&plugin=$1 [L] 

##### GENERIC RULES ##### 
RewriteRule \.(css|php|png|jpg|gif|ico|js|inc|txt|gz|xml|html)$ - [NC,L] 
RewriteRule ^([^/]*)/?$ index.php?page=$1 [L] 
RewriteRule ^([^/]*)/([^/]*)/?$ index.php?$1=$2 [L] 
RewriteRule ^([^/]*)/([^/]*)/([^/]*)/?$ index.php?page=$1&$2=$3 [L] 
RewriteRule ^([^/]*)/([^/]*)/([^/]*)/([^/]*)/?$ index.php?$1=$2&$3=$4 [L] 
RewriteRule ^([^/]*)/([^/]*)/([^/]*)/([^/]*)/([^/]*)/?$ index.php?page=$1&$2=$3&$4=$5 [L] 
RewriteRule ^([^/]*)/([^/]*)/([^/]*)/([^/]*)/([^/]*)/([^/]*)/?$ index.php?$1=$2&$3=$4&$5=$6 [L] 
+2

、すなわちのRewriteRule 'としてこれに' mp3'を追加処理されてから '.mp3'ファイルを除外しようとします\。(mp3 | css | php | png | jpg | gif | ico | js | inc | txt | gz | xml | html)$ - [NC、L] ' –

+0

ありがとう!それはうまくいった! – Manolis

答えて

0

答え、Ulrich Palhaが書いたように、

すなわち
のRewriteRuleとこれにmp3を追加処理されてからの.mp3ファイルを除外(mp3にある| | JPG |。CSS | PHP | PNGをGIF | ICO | JS |株式会社| TXT | GZ | XML | HTML)$ - [NC、L]

関連する問題