font-face无法使用.htaccess文件

时间:2015-02-13 19:11:08

标签: php css apache .htaccess

我有一个自定义字体,我用于我的网站,CSS如下所示:

@font-face {
font-family: 'roboto_condensed';
src: url('RobotoCondensed-Regular-webfont.eot');
src: url('RobotoCondensed-Regular-webfont.eot?#iefix') format('embedded-opentype'),
     url('RobotoCondensed-Regular-webfont.woff') format('woff'),
     url('RobotoCondensed-Regular-webfont.ttf') format('truetype'),
     url('RobotoCondensed-Regular-webfont.svg#roboto_condensedregular') format('svg');
font-weight: normal;
font-style: normal;

}

并且它完全正常,我想要roboto出现的所有地方都可以。但是,当我引入看起来像这样的.htaccess文件时,它开始无法正常工作:

    ErrorDocument 404 /error.php

Options +FollowSymLinks
RewriteEngine On

RewriteCond %{SCRIPT_FILENAME} !-d
RewriteCond %{SCRIPT_FILENAME} !-f

RewriteCond %{HTTP_HOST} !^$
RewriteCond %{HTTP_HOST} !^www\. [NC]
RewriteCond %{HTTPS}s ^on(s)|
RewriteRule ^ http%1://www.%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
RewriteRule ^(\w+)$ ./index.php?role=$1
RewriteRule ^(\w+)/$ ./index.php?role=$1
RewriteRule ^([\w]+)/([\w\s\.\']+)&([\s\w\'\.]+)$ ./result.php?role=$1&champ1=$2&champ2=$3

现在我不是htaccess文件中最好的但是我知道在原始服务器上我的网站上面的代码工作得很好但是现在我把它移到新的服务器上它只是显示下一个字体在行而不是roboto。这可能是我的apache设置有问题,还是有一些明显的红旗与我拥有的CSS或我的.htaccess文件?

1 个答案:

答案 0 :(得分:1)

尝试在ContinueWith

中的ExpiresActive On下添加此内容
public async Task GreetAllAsync(List<string> UserNames)
{
  var tasks = UserNames
    .Select(un => GreetAsync(un)
        .ContinueWith(x => {
            Console.WriteLine(un + " has been greeted");
        }));

    await Task.WhenAll(tasks);
}