2014-09-08 2 views
0

안녕 난 내 페이지의 배경에 이미지를 표시하기 위해 노력했습니다하지만 난에 오류자원 이미지로 해석하지만, MIME 타입 text/html과 오류로 이전

Resource interpreted as Image but transferred with MIME type text/html: 
"http://killerducky1.x10.mx/images/offline.png". killerducky1.x10.mx/:1 

가 계속 작동하지

concole하고 봐서는 구글 크롬 디바이스는 그

<html>

인 광고 하나에서 시작하고 난 everywh 보았다 ere와 couldent는 파일이 존재하고 그것을 조사하는 것 이외에 해결을 찾는다.

그러나 .httaccess가 그것과 관련이있다. 그래서 그것의 beacuse가 내가 오프라인/유지 보수 기능을 추가했는지 확실하지 않다는 것을 발견했다.

.httaccess

# -FrontPage- 
RewriteEngine On 
RewriteCond %{REQUEST_FILENAME} !-f 
RewriteCond %{REQUEST_FILENAME} !-d 
RewriteRule ^(.*)$ /profile.php?username=$1 
IndexIgnore .htaccess */.??* *~ *# */HEADER* */README* */_vti* 
### Maintenance Mode ###  
RewriteCond %{REQUEST_URI} !^/(offline\.php|images/offline\.png)$ 
RewriteRule ^(.*)$ offline\.php [L] 
### end of Maintenance Mode ### 
<Limit GET POST> 
order deny,allow 
deny from all 
allow from all 
</Limit> 
<Limit PUT DELETE> 
order deny,allow 
deny from all 
</Limit> 
AuthName killerducky1.x10.mx 
AuthUserFile /home/killerdu/public_html/_vti_pvt/service.pwd 
AuthGroupFile /home/killerdu/public_html/_vti_pvt/service.grp 

귀하의 문제는이 라인에

<html> 
<head> 
    <title>We are offline !</title> 
    </head> 
    <body> 
<style> 
body { 
    background-image: url('images/offline.png'); 
    background-color: #eee; 
     background-repeat: no-repeat; 
    background-attachment: fixed; 
    background-position: center; 
    background-size: 1387px 729px; 
} 
</style> 
</body> 
</html> 
+0

이 보인다'그래서 거의 무엇을 당신의 말하는 텍스트/HTML 파일 – Philipp

+0

인 offline.php''에 offline.png' 내 브라우즈가'offline.png'을 텍스트 파일로 읽는다는 것입니까? – KillerDucky1

+0

'AddType image/png .png'가 누락되었을 수 있습니다. – Philipp

답변

1

offline.php :

RewriteCond %{REQUEST_URI} !^/offline\.php$ 
RewriteRule ^(.*)$ offline\.php [L] 

위의 내용은 /offline.php으로 시작하지 않는 항목은 이미지가 포함 된 offline.php으로 리디렉션됩니다.

당신은으로 변경하여 문제를 해결할 수 있습니다 : 당신의 htaccess로 리디렉션처럼

RewriteCond %{REQUEST_URI} !^/(offline\.php|images/offline\.png)$ 
RewriteRule ^(.*)$ offline\.php [L] 
관련 문제