Php 禁止引导3字形图标403
我正在WAMP2.5(Win7)上使用NetteFramework2.2.1和Bootstrap3。我无法在浏览器中加载图标(错误403禁止) 浏览器看到什么 所有需要的字体都在文件夹C:\wamp\www\nette\www\font中\ .htaccess位于C:\wamp\www\nette\www\with content中Php 禁止引导3字形图标403,php,apache,.htaccess,glyphicons,nette,Php,Apache,.htaccess,Glyphicons,Nette,我正在WAMP2.5(Win7)上使用NetteFramework2.2.1和Bootstrap3。我无法在浏览器中加载图标(错误403禁止) 浏览器看到什么 所有需要的字体都在文件夹C:\wamp\www\nette\www\font中\ .htaccess位于C:\wamp\www\nette\www\with content中 <IfModule mod_autoindex.c> Options -Indexes </IfModule> # enable
<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>
Apache错误日志:
[2014年7月16日星期三11:55:01.004757][core:error][pid 3812:tid 788](操作系统)
5) 访问被拒绝:[客户端127.0.0.1:52031]AH00132:文件
权限拒绝服务器访问:
C:/wamp/www/nette/www/font/glyphicons-halflings-regular.svg,参考:
我尝试将用户everyone的所有权限设置为文件夹字体,但无论如何都不起作用。您在C:\wamp\www\nette\www\font中有字体 和css文件位于与文件夹字体相同的文件夹C:\wamp\www\nette\www(C:\wamp\www\nette\www\bootstrap.min.css)中 但是在css文件中是@font-face{font-family:'Glyphicons-Halflings';src:url(。/font/…所以引导css需要文件夹C:\wamp\www\nette\font中的所有字体(一级以上)
您可以将css文件移动到诸如“C:\wamp\www\nette\www\styles”、“C:\wamp\www\nette\www\css”之类的文件夹中,这样字体的路径就会匹配,或者更改css文件中的路径。我推荐第一种方法。请检查您的字体文件是否可以被运行apache的用户读取 除了字体文件所在的目录之外,字体文件本身也是可读的,这一点很重要
@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')}