I installed XAMPP on Windows. In the htdocs folder I created a folder with my WP project. The problem is that the main page starts, and when you go to any other page on the site, it redirects to localhost/dashboard. How to fix it?
In addition to the project, the htdocs folder contains basic XAMPP files and folders like index.php, dashboard folders, etc.
<?php
if (!empty($_SERVER['HTTPS']) && ('on' == $_SERVER['HTTPS'])) {
$uri = 'https://';
} else {
$uri = 'http://';
}
$uri .= $_SERVER['HTTP_HOST'];
header('Location: '.$uri.'/dashboard/');
exit;
?>