직접 편집해도 되지만, 레이아웃 관리에서 HTML - layout.html 상단에 넣어주자.
<!-- 자동으로 주소에 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. 붙여주기 끝 -->
능력자들은 여러 방법으로 해결하겠지만...
아무튼 이렇게 해 두면 기본 홈페이지에는 www.주소인데 www 안 붙어서 접속해서 에러 뜨거나 로그아웃 된 상태로 인식되 각종 메뉴에서 권한이 없다는 에러 메시지를 많이 방지할 수 있다.