Post Ticker

6/recent/ticker-posts

Index.php file of XAMPP


 Youn can see an "index.php" file in "c:\xampp\htdocs\index.php" if you do not change the default location of xampp.

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

The index file introduces another index file which is in the dashboard file on xampp xampp/htdocs/deshbord/index.html. If you want to change your home page of xampp, you should change the index.php file. Sopus my project file name is "quran", so I just change  /dashboard/ to /quran/. So my code will be:

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

And make an index file on the file. which is shown as your home page.

Or, you can add the simple code


<?php
    header('Location: '/dashboard/');
    exit;
?>

Post a Comment

2 Comments

  1. Nice, but I want to now how can I make a register form in html and css. Would you know how to make it? If you know, please say us how to make it?

    ReplyDelete
  2. If I introduce a indix. html file in htdocs, what is replaced in the place of dashboard.

    ReplyDelete

Thanks for your important comments. If this is your problem I will try to sloved this.