Skip to content

Commit

Permalink
added php fallbacks for vue router rotes. In the event of a page refr…
Browse files Browse the repository at this point in the history
…esh this will redirect users back to the app's launch page as opposed to a 404 from nginx.
  • Loading branch information
Ian committed Oct 11, 2024
1 parent 39e04a0 commit 67566de
Show file tree
Hide file tree
Showing 4 changed files with 80 additions and 0 deletions.
20 changes: 20 additions & 0 deletions email_forwarding.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<?php
require_once "root.php";
require_once "resources/require.php";
require_once "resources/check_auth.php";
require_once "resources/header.php";
require_once "resources/paging.php";

if(!$_SESSION['user']['extension']) {
echo "no extensions assigned to user";
include_once "footer.php";
die();
}

if(sizeof($_SESSION['user']['extension']) == 1) {
echo "<script type='text/javascript'>window.location.href = 'threadlist.php?extension_uuid=".$_SESSION['user']['extension'][0]['extension_uuid']."'; </script>";
}
else{
echo "<script type='text/javascript'>window.location.href = 'index.php'; </script>";

}
20 changes: 20 additions & 0 deletions manage_templates.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<?php
require_once "root.php";
require_once "resources/require.php";
require_once "resources/check_auth.php";
require_once "resources/header.php";
require_once "resources/paging.php";

if(!$_SESSION['user']['extension']) {
echo "no extensions assigned to user";
include_once "footer.php";
die();
}

if(sizeof($_SESSION['user']['extension']) == 1) {
echo "<script type='text/javascript'>window.location.href = 'threadlist.php?extension_uuid=".$_SESSION['user']['extension'][0]['extension_uuid']."'; </script>";
}
else{
echo "<script type='text/javascript'>window.location.href = 'index.php'; </script>";

}
20 changes: 20 additions & 0 deletions menu.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<?php
require_once "root.php";
require_once "resources/require.php";
require_once "resources/check_auth.php";
require_once "resources/header.php";
require_once "resources/paging.php";

if(!$_SESSION['user']['extension']) {
echo "no extensions assigned to user";
include_once "footer.php";
die();
}

if(sizeof($_SESSION['user']['extension']) == 1) {
echo "<script type='text/javascript'>window.location.href = 'threadlist.php?extension_uuid=".$_SESSION['user']['extension'][0]['extension_uuid']."'; </script>";
}
else{
echo "<script type='text/javascript'>window.location.href = 'index.php'; </script>";

}
20 changes: 20 additions & 0 deletions templates.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<?php
require_once "root.php";
require_once "resources/require.php";
require_once "resources/check_auth.php";
require_once "resources/header.php";
require_once "resources/paging.php";

if(!$_SESSION['user']['extension']) {
echo "no extensions assigned to user";
include_once "footer.php";
die();
}

if(sizeof($_SESSION['user']['extension']) == 1) {
echo "<script type='text/javascript'>window.location.href = 'threadlist.php?extension_uuid=".$_SESSION['user']['extension'][0]['extension_uuid']."'; </script>";
}
else{
echo "<script type='text/javascript'>window.location.href = 'index.php'; </script>";

}

0 comments on commit 67566de

Please sign in to comment.