diff --git a/.htaccess b/.htaccess index f5ab603..61690ac 100644 --- a/.htaccess +++ b/.htaccess @@ -9,7 +9,13 @@ # RewriteCond %{THE_REQUEST} \s/+(.*?)\.php[\s?] [NC] # RewriteRule ^ /%1 [R=301,L,NE] - + + RewriteEngine Off + + + RewriteEngine Off + + RewriteEngine On DirectoryIndex index.php diff --git a/optional.php b/optional.php index 1907bff..e295cea 100644 --- a/optional.php +++ b/optional.php @@ -1,99 +1,273 @@ - + +// Include header after potential redirects +include('header.php'); + +// Handle status messages (this part is optional if you want to display messages on the referring page) +if (isset($_GET['status'])) { + switch ($_GET['status']) { + case 'success': + echo "

✅ Your message has been sent successfully!

"; + break; + case 'error': + $error = isset($_GET['message']) ? htmlspecialchars($_GET['message']) : "There was an error sending your message. Please try again."; + echo "

❌ $error

"; + break; + case 'missing_fields': + echo "

⚠️ Please fill in all the required fields.

"; + break; + } +} +?> \ No newline at end of file