CKnapp Posted November 3, 2022 Share Posted November 3, 2022 (edited) Hi! I'm pretty new to Squarespace and website building in general, so please be kind 😉 I am working on updates to an existing website for the school I work at.  For marketing purposes, I'd like to create a simplified URL people can type in and have it redirected to the actual tour page, to allow people to type something simple that they will remember, as opposed to what the actual URL slug is.  For example, the existing page I want people to access is: www.cascadia.school/schedule-tour-inquiry-form but in marketing materials, for simplicity sake, I'd like to just post the address as www.cascadia.school/tour, so I'm trying to create a temporary redirect as opposed to changing the /url slug completely (for SEO reasons, etc.). Following the online tutorial, I went to the page for our tours, found URL Mappings and typed in the following: /tour -> /schedule-tour-inquiry-form 302 This doesn't seem to be working, as when I go to a new browser window and type in www.cascadia.school/tour, it takes me to the 404 error page.  There is no actual page on my site called www.cascadia.school/tour, so could that be the problem? Though from what I read, that shouldn't be the case.  Any idea what I'm missing? Edited November 3, 2022 by CKnapp Link to comment
tuanphan Posted November 4, 2022 Share Posted November 4, 2022 Add this to old page header <script> window.location.href = "www.cascadia.school/schedule-tour-inquiry-form"; </script>  CKnapp 1 Email me if you have need any help (free, of course.). Answer within 24 hours. Or send to forum message How to: Setup Password & Share url - Insert Custom CSS - Page Header - Upload Custom Font - Upload File - Find Block ID - Contact Customer Care Link to comment
melaniejaane Posted March 6 Share Posted March 6 On 11/4/2022 at 9:03 PM, tuanphan said: Add this to old page header <script> window.location.href = "www.cascadia.school/schedule-tour-inquiry-form"; </script>  Hey @tuanphan is there a way to edit this script so it doesn't redirect when we're in config mode? Thanks 🙂 Link to comment
tuanphan Posted March 8 Share Posted March 8 On 3/7/2023 at 4:34 AM, melaniejaane said: Hey @tuanphan is there a way to edit this script so it doesn't redirect when we're in config mode? Thanks 🙂 Suppose your site url is melanie.squarespace.com You can add this to url to disable code in edit mode melanie.squarespace.com/config/safe Email me if you have need any help (free, of course.). Answer within 24 hours. Or send to forum message How to: Setup Password & Share url - Insert Custom CSS - Page Header - Upload Custom Font - Upload File - Find Block ID - Contact Customer Care Link to comment
melaniejaane Posted March 9 Share Posted March 9 17 hours ago, tuanphan said: Suppose your site url is melanie.squarespace.com You can add this to url to disable code in edit mode melanie.squarespace.com/config/safe  Thanks @tuanphan is there a way to do this automatically in the script, like adding an exemption if the source comes from the squarespace url as opposed to the public domain? Just discovered the lazy summaries plugin won't work unless the source page is enabled and password free.  😞 Unfortunately need to go back through multiple websites, unlock the blog pages then set up redirects. Hoping to limit opt-in/out actions as much as possible for other site contributors. 🤞 Link to comment
derricksrandomviews Posted March 9 Share Posted March 9 Try this redirect  /tour -> /schedule-tour-inquiry-form 301 Link to comment
melaniejaane Posted March 10 Share Posted March 10 <script> if (window.location.hostname == 'unityweek.squarespace.com') { clearTimeout(function(){ window.location.href = '/resources-list'; /*existing page - blog*/ })(); } else { setTimeout(function(){ window.location.href = '/resources'; /*redirect - new page */ }, 000); } </script> UPDATE:@tuanphan I've written the above snippet which half solves the problem. Maybe you can improve it? It turns off the redirect function when using the Squarespace hostname, unfortunately I couldn't find a way to specify the config mode though. Would you know how to do this? Thanks again! 😊  Squarespace url: unityweek.squarespace.com/resources-list Public url: unityweek.co.nz/resources-list  Link to comment
tuanphan Posted March 10 Share Posted March 10 8 hours ago, melaniejaane said: <script> if (window.location.hostname == 'unityweek.squarespace.com') { clearTimeout(function(){ window.location.href = '/resources-list'; /*existing page - blog*/ })(); } else { setTimeout(function(){ window.location.href = '/resources'; /*redirect - new page */ }, 000); } </script> UPDATE:@tuanphan I've written the above snippet which half solves the problem. Maybe you can improve it? It turns off the redirect function when using the Squarespace hostname, unfortunately I couldn't find a way to specify the config mode though. Would you know how to do this? Thanks again! 😊  Squarespace url: unityweek.squarespace.com/resources-list Public url: unityweek.co.nz/resources-list  Config mode, you mean disable code on edit mode? Email me if you have need any help (free, of course.). Answer within 24 hours. Or send to forum message How to: Setup Password & Share url - Insert Custom CSS - Page Header - Upload Custom Font - Upload File - Find Block ID - Contact Customer Care Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment