0

Wamp 2.5 (Win7) で Nette Framework 2.2.1 と BootStrap 3 を使用しています。ブラウザでグリフィコンをロードできません (エラー 403 Forbidden)。

ブラウザが見るもの ここに画像の説明を入力

必要なすべてのフォントはフォルダ C:\wamp\www\nette\www\fonts\ にあります

.htaccess は C:\wamp\www\nette\www\ にあります。

<IfModule mod_autoindex.c>
    Options -Indexes
</IfModule>

# enable cool URL
<IfModule mod_rewrite.c>
    RewriteEngine On
    # RewriteBase /

    # prevents files starting with dot to be viewed by browser
    RewriteRule /\.|^\. - [F]

    # front controller
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule !\.(eot|svg|ttf|woff|pdf|js|ico|gif|jpg|png|css|rar|zip|tar\.gz)$ index.php [L]
</IfModule>

C:\wamp\www\nette\www\bootstrap.min.css が含まれています

@font-face{font-family:'Glyphicons Halflings';src:url(../fonts/glyphicons-halflings-regular.eot);src:url(../fonts/glyphicons-halflings-regular.eot?#iefix) format('embedded-opentype'),url(../fonts/glyphicons-halflings-regular.woff) format('woff'),url(../fonts/glyphicons-halflings-regular.ttf) format('truetype'),url(../fonts/glyphicons-halflings-regular.svg#glyphicons_halflingsregular) format('svg')}

Apache エラー ログ:

[Wed Jul 16 11:55:01.004757 2014] [core:error] [pid 3812:tid 788] (OS 5) アクセスが拒否されました。: [クライアント 127.0.0.1:52031] AH00132: ファイルのアクセス許可がサーバー アクセスを拒否しています: C:/wamp/www/nette/www/fonts/glyphicons-halflings-regular.svg、リファラー: http://www.nette.local/芸術/ポルタ・キ・リグラ

ユーザー全員のすべての権限をフォルダーフォントに設定しようとしましたが、とにかく機能しません。

4

2 に答える 2

1

C:\wamp\www\nette\www\fontsにフォントがあります。

同じフォルダーC:\wamp\www\nette\www内の css ファイルをフォルダーフォントとして( C:\wamp\www\nette\www\bootstrap.min.css )。

しかし、css ファイルは @font-face{font-family:'Glyphicons Halflings';src:url( ../fonts/ ... なので、ブートストラップ css はフォルダーC:\wamp\www\nette\fonts ( 1 つ上のレベル)

css ファイルを「C:\wamp\www\nette\www\styles」、「C:\wamp\www\nette\www\css」などのフォルダーに移動すると、フォントへのパスが一致するか、またはcss ファイルのパスを変更します。最初の方法をお勧めします。

于 2014-07-23T22:13:42.317 に答える
1

apache を実行しているユーザーがフォント ファイルを読み取れることを確認します。

フォント ファイルが存在するディレクトリに加えて、フォント ファイル自体が読み取り可能であることが重要です。

于 2014-07-23T22:17:02.700 に答える