Skip to content

Instantly share code, notes, and snippets.

@boring-dragon
Created May 14, 2023 14:28
Show Gist options
  • Save boring-dragon/df256ee92f16507df1b37973096e2ce1 to your computer and use it in GitHub Desktop.
Save boring-dragon/df256ee92f16507df1b37973096e2ce1 to your computer and use it in GitHub Desktop.

Revisions

  1. boring-dragon created this gist May 14, 2023.
    6 changes: 6 additions & 0 deletions index.php
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,6 @@
    <?php
    if (($path = ltrim($_SERVER['REQUEST_URI'], '/')) && !in_array(substr($path, 0, 1), array('?', '#', '/'))) {
    header("Location: $path");
    exit;
    }
    ?>