0

那是我的网址:

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

演示文稿是公用文件夹中的文件夹,但是当我打开此链接时出现此错误:

指定的控制器无效(演示文稿)

那是我的 .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.'test')谷歌查看器可以打开文件:

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

2 回答 2

0

调整你的最后一条规则

RewriteRule !\.(js|ico|gif|jpg|png|css|swf|html|pps|ppt)$ index.php [NC,L]
于 2012-10-05T12:38:39.093 回答
0

Are you configure mod_rewrite in the right way? Files should not be redirected to the index.php. My example of .htaccess file:

RewriteEngine On
RewriteCond %{REQUEST_FILENAME} -s [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^.*$ - [NC,L]
RewriteRule ^.*$ index.php [NC,L]
于 2012-10-05T06:26:35.980 回答