From cea7abff34af21ace2649bde5e3caa7e63de4f4c Mon Sep 17 00:00:00 2001 From: Jaidyn Lev Date: Sun, 7 Oct 2018 01:41:08 -0500 Subject: [PATCH] Added visible/real URL alias distinction --- public_html/conjure.php | 3 ++- resources/config.php | 8 +++++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/public_html/conjure.php b/public_html/conjure.php index 9af7706..981d19a 100644 --- a/public_html/conjure.php +++ b/public_html/conjure.php @@ -14,6 +14,7 @@ if (!empty($_POST["url_target"]) && !empty($_POST["url_alias"])) $url_alias = $_POST["url_alias"]; $url_alias = sanitize_filename($url_alias); + $visible_dest = $url_aliasize_dir . $url_alias . $url_aliasize_visible_suffix; $dest_file = $url_aliasize_dir . $url_alias . $url_aliasize_suffix; $beaming_permitted = 0; @@ -55,7 +56,7 @@ switch ($beaming_permitted) break; case 0: write_alias($dest_file, $url_target); - celebrate($dest_file, $url_aliasize_item, + celebrate($visible_dest, $url_aliasize_item, $url_aliasize_win_img, $url_aliasize_win_alt); break; } diff --git a/resources/config.php b/resources/config.php index b5782ee..2a4b169 100644 --- a/resources/config.php +++ b/resources/config.php @@ -19,9 +19,11 @@ $url_aliasize_die_alt = "A whimsical mask on fire."; $url_aliasize_item = "mask"; // what the alias is affectionately called $url_aliasize_dir = "u/"; // where the redirects go -$url_aliasize_suffix = ""; // suffix to redirect links; some web-servers - // only execute ".php" files, so if things - // don't work, set as ".php" +$url_aliasize_visible_suffix = "php"; // suffix visible in redirect links +$url_aliasize_suffix = "php"; // actual suffix in redirect links + // (the distinction is important if you use + // URL rewriting for the /u/ folder or + //something // vars related to file uploading