WWW고정 스크립 :: 2016. 4. 6. 10:05
홈페이지 주소에 무조건 WWW이 붙게 만드는 스크립트입니다.
<head> </head>사이에 삽입
<!--WWW고정 스크립시작-->
<script language="JavaScript" type="text/javascript">
var host = location.host.toLowerCase();
var currentAddress = location.href;
if (host.indexOf("www") == -1)
{
currentAddress = currentAddress.replace("//","//www.");
location.href = currentAddress;
}
</script>
<!--WWW고정 스크립끝-->
'어쩌다 안 팁' 카테고리의 다른 글
마우스 오른쪽 메뉴 등록하기 (0) | 2018.01.29 |
---|---|
ICO 포맷 플러그인 (0) | 2014.09.11 |
괜찮은 MP3 PLAYER "AIMP" (0) | 2013.05.18 |
WINDOWS7 탐색에서 한단계위로 단추 만들기 - classic shell (0) | 2013.04.21 |
무선네트워크 연결이 자주 끊길때 해결법 (0) | 2013.04.15 |