diff --git a/includes/config.php b/includes/config.php index e591f73..94c9f0c 100644 --- a/includes/config.php +++ b/includes/config.php @@ -2,7 +2,7 @@ $host = "localhost"; $user = "root"; $pass = ""; -$db = "mydatabase"; +$db = "hitnrun"; $conn = new mysqli($host, $user, $pass, $db); diff --git a/public/.htaccess b/public/.htaccess index 24ab2d3..f8fbdcd 100644 --- a/public/.htaccess +++ b/public/.htaccess @@ -1,11 +1,8 @@ -# Turn on rewrite engine RewriteEngine On -# If the request is NOT a real file… +# Don't rewrite existing files or directories RewriteCond %{REQUEST_FILENAME} !-f - -# …and NOT a real folder… RewriteCond %{REQUEST_FILENAME} !-d -# Rewrite /something → something.php -RewriteRule ^(.+)$ $1.php [L,QSA] +# Redirect everything else to index.php +RewriteRule ^(.*)$ index.php [L] diff --git a/public/index.php b/public/index.php index 65b4ba6..211c7eb 100644 --- a/public/index.php +++ b/public/index.php @@ -2,7 +2,7 @@ require "../includes/config.php"; if (!isset($_SESSION["uid"])) { - header("Location: login.php"); + header("Location: signin.php"); exit; } ?> diff --git a/public/logout.php b/public/logout.php index 7649023..8ba2a2e 100644 --- a/public/logout.php +++ b/public/logout.php @@ -1,5 +1,5 @@ - + - + -