Php XAMPP重定向到仪表板而不是所需页面

Php XAMPP重定向到仪表板而不是所需页面,php,html,login,xampp,Php,Html,Login,Xampp,所以我使用的是XAMPP,但当我点击一个链接时,它会将我重定向到localhost/dashboard,而不是我想要的页面。我怎样才能解决这个问题 这是索引页的代码 <!DOCTYPE html> <html> <head> <title>SG Weredi</title> <link rel="stylesheet" type="text/css" href="style.css"> <script type="te

所以我使用的是XAMPP,但当我点击一个链接时,它会将我重定向到localhost/dashboard,而不是我想要的页面。我怎样才能解决这个问题

这是索引页的代码

<!DOCTYPE html>
<html>
<head>
<title>SG Weredi</title>
<link rel="stylesheet" type="text/css" href="style.css">
<script type="text/javascript" src="http://code.jquery.com/jquery-1.8.2.js"></script>
<script type="text/javascript" src="http://code.jquery.com/ui/1.10.3/jquery-ui.js"></script>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<meta name="viewport" content="width=device-width, initial-scale=1">
<script src="loginpagina.js"></script>
</head>
<body>


  <div class="header">
    <a href="/">Your App Name</a>
  </div>

  <div class="container-fluid">
    <img class =" logo" src="http://www.weredi.nl/logo.png">
  </div>

    <?php if( !empty($user) ): ?>

    <br />Welcome <?= $user['email']; ?> 
    <br /><br />You are successfully logged in!
    <br /><br />
    <a href="logout.php">Logout?</a>

  <?php else: ?>

    <h1>Please Login or Register</h1>
    <a href="Infproject/login.php">Login</a> or
    <a href="register.php">Register</a>

  <?php endif; ?>

</body>
</html>

韦雷迪酒店

欢迎光临

您已成功登录!

请登录或注册 或
唯一正确的链接是

您应该对登录执行相同的操作:

而不是

同样的解决方案也适用于项目主页的链接:


而不是



因为站点上的
href=“/”
会将您重定向到
C:/xampp/htdocs
中的
index.php
,它会重定向到
C:/xampp/htdocs/dashboard/
localhost/dashboard
)。

尝试将端口号更改为新的,然后重新启动apache服务器。
我将端口号从8082更改为8084,并重新启动了服务器。这对我很有效。

请发布你的.htaccess重写规则。我已经尝试删除htdocs中的index.php文件,但我进入了localhost页面。当我在中单击项目时,会将我重定向到我的索引页,但链接不起作用。您单击的是什么链接?@HonzaRydrych我在哪里找到它们:)?@MasivuyeCokile,例如register.php链接