2012-10-04 35 views
0

這是我的網址:Zend框架:路線西里爾URL靜態文件

http://site.com/presentations /тест-тест.ppt

演講是公共文件夾中的文件夾,但是當我打開這個鏈接是出現此錯誤:

Invalid controller specified (presentations)

那是我的.htaccess文件:

SetEnv APPLICATION_ENV production 


RewriteEngine On 
#RewriteBase all4you/public/ 
RewriteCond %{REQUEST_FILENAME} -s [OR] 
RewriteCond %{REQUEST_FILENAME} -l [OR] 
RewriteCond %{REQUEST_FILENAME} -d 
RewriteRule ^.*$ - [NC,L] 
RewriteRule ^.*$ index.php [NC,L] 
RewriteRule !\.(js|ico|gif|jpg|png|css|swf|html|pps)$ index.php [NC,L] 


order allow,deny 
allow from all 

這是我的谷歌的iframe:

<iframe class="school-ppt-material-cont" src="http://docs.google.com/gview?url=<?= $fileSrc ?>&embedded=true" frameborder="0"></iframe> 

這就是$fileSrc,但如果演示文稿名稱是西里爾文,谷歌瀏覽器無法打開文件,但如果文件名是否西里爾文(exp。 '測試')谷歌瀏覽器可以打開文件:

$fileSrc = 'http://mysite/presentations/тест-тест.ppt'; 
$fileSrc = 'http://mysite/presentations/test-test.ppt'; 
+0

什麼是你的磁盤/服務器上的文件名?西里爾文或拉丁文? – Jojo

+0

Latin(windows 1251) –

回答

0

您是否以正確的方式配置mod_rewrite?文件不應該被重定向到index.php。我.htaccess文件的例子:

RewriteEngine On 
RewriteCond %{REQUEST_FILENAME} -s [OR] 
RewriteCond %{REQUEST_FILENAME} -l [OR] 
RewriteCond %{REQUEST_FILENAME} -d 
RewriteRule ^.*$ - [NC,L] 
RewriteRule ^.*$ index.php [NC,L] 
0

適應你的最後一個規則來

RewriteRule !\.(js|ico|gif|jpg|png|css|swf|html|pps|ppt)$ index.php [NC,L] 
+0

如果URL是http://site.com/presentations/тест-тест.ppt,則不要打開文件,但如果URL是http://site.com/presentations/test-test.ppt文件是開放 –

+0

西里爾文件名/ url是一個不同的問題,我認爲 – Jojo

+0

如何解決這個問題? –