경우에 따라, 404에러에 대해 아파치가 기본적으로 보여주는 에러페이지가 아닌, 개별적인 커스터마이징을
하고자 하는 경우가 생기게 마련인데..
이때는 /etc/httpd/conf/httpd.conf 를 열어서 아래와 같이 바꿔주시기 바랍니다.

httpd.conf

<VirtualHost *>
    DocumentRoot /home/domain
    ServerName domain.co.kr
    ServerAlias www.domain.co.kr
    ErrorDocument 404 /home/domain/error404.php
</VirtualHost>

버추어호스트에 물려놓은 도메인마다 개별 설정하는게 좋습니다. 서버에 물려 있는 모든 도메인에 동일한 404를
보여주려는 목적이라면 그냥 기본 404에러페이지를 쓰는 것도 나쁘지 않으니깐요.

남은 일은 error404.php 라는 파일을 만들어서 서버에 올려두는 일뿐입니다.

error404.php
<html>
<body>
잘못 찾아오셨습니다.<br>You got 404 Error!!!! orz
</body>
</html>

404에러가 났을때 만약 에러페이지로 보내지 않고, index.html 과 같은 메인페이지로 보내고 싶다면
ErrorDocument 404 /home/domain/error404.php 를
ErrorDocument 404 /home/domain/index.html 로 바꾸셔도 괜찮습니다.
Posted by 동원삼치
PNG 포맷의 백그라운드가 투명한 경우 익스플로러 6.0 (이하 IE6) 에서는 이를 인식하지 못합니다.
웹브라우저 호환성을 위해서라도, PNG 포맷으로 투명한 백그라운드의 이미지를 사용하고자 하는 경우에는
CSS에 반드시 아래와 같은 구문을 선언하여, IE6에 한한 버그픽스를 하시기 바랍니다.

png_fix.css로 저장하세요
* html img,
* html .png{
position:relative;
behavior: expression((this.runtimeStyle.behavior="none")&&(this.pngSet?this.pngSet=true:(this.nodeName == "IMG" && this.src.toLowerCase().indexOf('.png')>-1?(this.runtimeStyle.backgroundImage = "none",
this.runtimeStyle.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + this.src + "', sizingMethod='image')",
this.src = "transparent.gif"):(this.origBg = this.origBg? this.origBg :this.currentStyle.backgroundImage.toString().replace('url("','').replace('")',''),
this.runtimeStyle.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + this.origBg + "', sizingMethod='crop')",
this.runtimeStyle.backgroundImage = "none")),this.pngSet=true)
);
}

<HEAD></HEAD> 내에 삽입하세요
<!--[if lte IE 6]>
<link rel="stylesheet" type="text/css" href="png_fix.css" />
<![endif]-->

핵심은 AlphaImageLoader 를 사용한다는 점입니다.
개발자는 관심없겠지만 디자이너라면 필히 참고해 두시길~
Posted by 동원삼치

BLOG main image
by 동원삼치

카테고리

전체 (15)
HTML (1)
JQUERY (7)
PHP (3)
APACHE (3)
JAVASCRIPT (1)

글 보관함