<?php

$dir = trim(strrchr(dirname(realpath(__DIR__)), DIRECTORY_SEPARATOR), DIRECTORY_SEPARATOR);
$path = strchr(ltrim($_SERVER['REQUEST_URI'], '/'), '/', true);

$url = 'http://'.$_SERVER['HTTP_HOST'].($dir == $path ? '/'.$path : '').'/install/';

header('location:'.$url);