<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<script>
document.addEventListener('DOMContentLoaded', function () {
const protocol = window.location.protocol;
const hostname = window.location.hostname;
const parts = hostname.split('.');
let newUrl = '';
if (hostname === 'co.cc') {
// 그냥 co.cc → cc.cc
newUrl = protocol + '//cc.cc';
} else if (parts.length >= 3 && parts.slice(-2).join('.') === 'co.cc') {
// *.co.cc 형태일 때 마지막 서브도메인 추출
const lastSub = parts[parts.length - 3]; // co.cc 앞쪽 1단계
newUrl = protocol + '//' + lastSub + '.cc.cc';
} else {
// 그 외는 전부 cc.cc로
newUrl = protocol + '//cc.cc';
}
window.location.href = newUrl;
});
</script>
</head>
</html>