Browse Source

Relative paths and gitignore config.php

Pablo Ferreiro 3 years ago
parent
commit
d5bf2c2061
5 changed files with 8 additions and 6 deletions
  1. 1 0
      .gitignore
  2. 1 0
      README.md
  3. 0 0
      config.sample.php
  4. 4 4
      misc/footer.php
  5. 2 2
      settings.php

+ 1 - 0
.gitignore

@@ -0,0 +1 @@
+/config.php

+ 1 - 0
README.md

@@ -40,6 +40,7 @@ If you want to host it just for yourself a PHP development server should be enou
 ```
 git clone https://github.com/hnhx/librex.git
 cd librex
+cp config.sample.php config.php
 sudo php -S 127.0.0.1:80
 ```
 <br/>

+ 0 - 0
config.php → config.sample.php


+ 4 - 4
misc/footer.php

@@ -1,10 +1,10 @@
 <div class="footer-container">
-    <a href="/">LibreX</a>
+    <a href="./">LibreX</a>
     <a href="https://github.com/hnhx/librex/" target="_blank">Source &amp; Instance list</a>
-    <a href="/settings.php">Settings</a>
+    <a href="./settings.php">Settings</a>
       <a href="https://based-or-botnet.neocities.org/" target="_blank">Privacy guides</a>
-    <a href="/api.php" target="_blank">API</a>
-    <a href="/donate.php">Donate ❤️</a>
+    <a href="./api.php" target="_blank">API</a>
+    <a href="./donate.php">Donate ❤️</a>
 </div>
 </body>
 </html>

+ 2 - 2
settings.php

@@ -21,7 +21,7 @@
                     better_setcookie("nitter");
                     better_setcookie("libreddit");
                     
-                    header("Location: /settings.php");
+                    header("Location: ./settings.php");
                     die();
                 }
                 else if (isset($_REQUEST["reset"]))
@@ -34,7 +34,7 @@
                             setcookie($name, "", time() - 1000);
                         }
 
-                        header("Location: /settings.php");
+                        header("Location: ./settings.php");
                         die();
                     }
                 }