Click here to Skip to main content
15,884,838 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hello I want to add a favicon for my webpage but for some reason this only works on the index.php page why is this happening?

index.php this one works and shows the favicon
<head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no" />
    <meta name="description" content="" />
    <meta name="author" content="" />
    <title>Shop Homepage</title>
    <!-- Favicon-->
    <link rel="icon" type="image/x-icon" href="assets/favicon.ico" />
    <!-- Bootstrap icons-->
    <link href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.5.0/font/bootstrap-icons.css" rel="stylesheet" />
    <!-- Core theme CSS (includes Bootstrap)-->
    <link href="css/styles.css" rel="stylesheet" />
    <link href="css/stylecart.css" rel="stylesheet" />
    <script src="js/scripts.js" async></script>

</head>


this is for login script but it doesn't work here and I can't figure out why
<html lang="en">
  <head>
        <meta charset="utf-8" />
        <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no" />
        <meta name="description" content="" />
        <meta name="author" content="" />
        <title>Inloggen</title>
        <!-- Favicon-->
        <link rel="icon" type="image/x-icon" href="assets/favicon.ico" />
        <!-- Bootstrap icons-->
        <link href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.5.0/font/bootstrap-icons.css" rel="stylesheet" />
<pre><link href="css/styles.css" rel="stylesheet" />

  </head>


What I have tried:

been trying to look it up but can't find the anwser
Posted
Updated 15-Mar-22 4:48am
v2
Comments
Richard MacCutchan 15-Mar-22 11:47am    
Maybe because assets/favicon.ico is not in the direct path from that page.
Rebecca2002 16-Mar-22 2:47am    
I have both index.php and login.php in the same folder so both of them should have the same link to the favicon file right?
Richard MacCutchan 16-Mar-22 4:39am    
Yes, that should work.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900