Thursday, September 11, 2014

XAMPP를 설치후에 localhost가 제대로 안나올때

XAMPP를 설치후에 localhost를 입력하면 localhost/xampp/로 이동한다.
이렇게 동작하는 이유는 index.php안에 다음과 같이 redirect 명령이 들어 있기 때문이다.

<?php
if (!empty($_SERVER['HTTPS']) && ('on' == $_SERVER['HTTPS'])) {
$uri = 'https://';
} else {
$uri = 'http://';
}
$uri .= $_SERVER['HTTP_HOST'];
header('Location: '.$uri.'/xampp/');
exit;
?>
Something is wrong with the XAMPP installation :-(

그래서 c:\xampp\htdocs\index.php를 이름 index1.php로 변경하면 index.html이 정상적으로 로딩된다.

No comments:

Post a Comment