WEB WAS/WEB
[apache] redirect 페이지 만들기
홍또~
2021. 3. 31. 10:47
요청url에 따라 특정 페이지로 강제로 이동하는 소스
<html>
<head>
<title>TEST</title>
<script>
var nowURL = window.document.URL;
if(nowURL=='https://test1.com/')
{
location.href= 'https://test1.com/login.do';
}
else if(nowURL=='http://test2.com/')
{
location.href= 'http://test2.com/main.do';
}
</script>
</head>
<body>
</body>
</html>