Http: //localhost/index.php redirect to http: // localhost / xampp /

Good afternoon guys!

As mentioned in this thread, localhost redirects me to the xampp page. I am trying to open a custom index.php page that is inside the project folder, and the project folder is inside the htdocs folder. Reinstalling xampp did not help. Everything worked fine yesterday, and nothing inside .php was changed. Any help is appreciated!

+5
source share
2 answers

The index file in Xampp redirects to the xampp folder. Change the default project

<?php
    if (!empty($_SERVER['HTTPS']) && ('on' == $_SERVER['HTTPS'])) {
        $uri = 'https://';
    } else {
        $uri = 'http://';
    }
    $uri .= $_SERVER['HTTP_HOST'];

    //CHANGE THIS LINE
    header('Location: '.$uri.'/xampp/');
    //header('Location: '.$uri.'/yourproject/');

    exit;
?>
Something is wrong with the XAMPP installation :-(

OR put in the browser:

http: // localhost / YourProject /index.php

+7
source

local / xampp / index.php

WAMP, , .

-1

All Articles