mtnddk Posted November 22, 2020 Share Posted November 22, 2020 (edited) Site URL: http://martindudekphoto.com I want to redirect a page that exists in my squarespace account: /portfolio/uganda/ to another page that exists as well: /work/uganda/ That doesn't work, the redirect is being ignored and /portfolio/uganda/ shown as normal. Apparently I can only redirect not existing pages, what can I do to fix that? Context: The reason is, I have 2 different portfolio pages: one with my whole portfolio (8 items) and one that I have as my home page (just 3 items), because I want to use the "hover: background" functionality, but not for the entire 8 items. Edited November 22, 2020 by mtnddk Link to comment
derricksrandomviews Posted November 23, 2020 Share Posted November 23, 2020 You can redirect an inactive page to an active page. https://support.squarespace.com/hc/en-us/articles/205815308-URL-redirects Link to comment
mtnddk Posted November 23, 2020 Author Share Posted November 23, 2020 (edited) Thanks, @derricksrandomviews, but the one I am redirecting FROM is actually a portfolio item, which can not be deactivated (would be alright if it could), at least there is no such option in the portfolio item settings? Is there no possibility to do that? Edited November 23, 2020 by mtnddk Link to comment
derricksrandomviews Posted November 23, 2020 Share Posted November 23, 2020 4 hours ago, mtnddk said: Thanks, @derricksrandomviews, but the one I am redirecting FROM is actually a portfolio item, which can not be deactivated (would be alright if it could), at least there is no such option in the portfolio item settings? Is there no possibility to do that? You can deactivate the portfolio item if you remove it from the portfolio first. You should be able to drag it to the unlinked section of your site, then disable it. Link to comment
mtnddk Posted November 23, 2020 Author Share Posted November 23, 2020 Thanks for your patience @derricksrandomviews, but that does not seem to be an option. Check out the attached screenshots, is that just my account where it doesn't work? Link to comment
derricksrandomviews Posted November 23, 2020 Share Posted November 23, 2020 (edited) This is a tough one and it comes up often. This and bilingual sites with two domains, one to one "home" page and one to another, which can't be done unless you give out a sub domain which all pages have technically. Usually we tell folks to create a landing page, both main domains hit the page and then two action buttons direct the visitor to each page. Hopefully you will get a better answer than that from the folks here. Edited November 23, 2020 by derricksrandomviews Link to comment
tuanphan Posted November 24, 2020 Share Posted November 24, 2020 Hi. Do you use Personal Plan or higher? You can use JavaScript to redirect page. 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
kickmouth Posted February 11, 2021 Share Posted February 11, 2021 Hey @tuanphan - can you tell me more about the JavaScript redirect please Thanks Jason Link to comment
tuanphan Posted February 16, 2021 Share Posted February 16, 2021 On 2/11/2021 at 10:53 PM, kickmouth said: Hey @tuanphan - can you tell me more about the JavaScript redirect please Thanks Jason Add to Page Header (page where you want to it redirect to new url) <script> setTimeout(function(){ window.location.href = 'https://beaverhero.com'; }, 5000); </script> 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
zemaria Posted December 30, 2021 Share Posted December 30, 2021 (edited) On 2/16/2021 at 3:50 AM, tuanphan said: Add to Page Header (page where you want to it redirect to new url) <script> setTimeout(function(){ window.location.href = 'https://beaverhero.com'; }, 5000); </script> I need to redirect a portfolio project (which doesn't have a code injection tab) to another portfolio. So that I can have a portfolio inside a portfolio. Can I use this script but limit it to a specific page, for example: If page is X, then redirect to page Z I can't use the URL mapping function because I have to have page X active. Thank you in advance Edited December 30, 2021 by zemaria Link to comment
zemaria Posted December 31, 2021 Share Posted December 31, 2021 @tuanphanI tried injecting the code you posted in a code block in the page, and it works, but not well at all. If I click on link to the page I want to redirect, it redirects to the one I want, but it flashes multiple times in the process. Link to comment
tuanphan Posted January 1, 2022 Share Posted January 1, 2022 On 12/31/2021 at 7:54 AM, zemaria said: @tuanphanI tried injecting the code you posted in a code block in the page, and it works, but not well at all. If I click on link to the page I want to redirect, it redirects to the one I want, but it flashes multiple times in the process. If you need redirect immediately, use this new code <script> window.location.href = 'https://beaverhero.com'; </script> 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
zemaria Posted January 1, 2022 Share Posted January 1, 2022 Thanks! I tried that, but there's still a flashing when the page is redirected. Link to comment
alleinedragonfyre Posted January 14, 2022 Share Posted January 14, 2022 (edited) I would also like to be able to instantly redirect a page that exists in my top-level navigation. It's there now if you'd like to see what I'm trying to do. Right now I have Discord pointing to a page that has our Discord server embedded in a page. I don't like how it's functioning, so I'd rather just redirect visitors to the web page access to our server. How can I do that? Edited January 14, 2022 by alleinedragonfyre forgot to add link to example Link to comment
creedon Posted January 14, 2022 Share Posted January 14, 2022 @alleinedragonfyre Would a Link page work for you needs? Find my contributions useful? Please like, upvote, mark my answer as the best ( solution ), and see my profile. Thanks for your support! I am a Squarespace ( and other technological things ) consultant open for new projects. Link to comment
g_franchini Posted January 17, 2022 Share Posted January 17, 2022 On 1/1/2022 at 4:00 AM, tuanphan said: If you need redirect immediately, use this new code <script> window.location.href = 'https://beaverhero.com'; </script> Hi Tuan, I've found your code to be very useful to link from my Forte 7.0 homepage collection titles to the related project pages (website: www.gabrielefranchini.it PW: gf2021 ), there is only a little issue working on Squarespace: once you've set the code in the advanced > page injection code section using your owned external domain, if then you click on the page in the left Squarespace column, it has some problem and turns white as shown in the bottom video. It happens only using an external domain as shown, if you use the "Squarespace default URL" it doesn't have any problem, but once someone click on the collection title, then he goes to the default squarespace URL instead of your domain. Is there any way to set your code with just the last part of the directory? Like '/projects/924' omitting the domain part so that it doesn't give problems managing Squarespace, and also doesn't send you out of the correct owned URL? Thank you! Link to comment
Lauren_C Posted February 23, 2022 Share Posted February 23, 2022 Hello Tuan, I have the same problem as the person above. The code has broken the Squarespace backend editor of our site. How can I access the page to disable the script? Link to comment
g_franchini Posted February 24, 2022 Share Posted February 24, 2022 9 hours ago, Lauren_C said: Hello Tuan, I have the same problem as the person above. The code has broken the Squarespace backend editor of our site. How can I access the page to disable the script? Hi Lauren, I don’t know how to modify the code to solve the problem, but I also had your same issue: it happened since you probably injected that code in the home page settings. The solution I used, was to go on the Squarespace mobile app, add a page to my website, chose it to be the new home page, and then the Squarespace editor will works again properly. At that point, remove the custom code you added to the original home page, set it once again as home page, and remove the page you added to unlock it all. Done. I think the whole thing happened because we used our custom domain as redirected URL, so as you access the Squarespace editor, it’s like it’s immediately redirected outside of itself. That code is perfect, but it can’t be used in the home page CSS. If Tuan have another solution, modifing the code, I’m still interested too. Cheers. Link to comment
paul2009 Posted February 24, 2022 Share Posted February 24, 2022 10 hours ago, Lauren_C said: How can I access the page to disable the script? You can put your site into a "safe mode" that prevents custom scripts from loading by adding "/config/safe" to you site's URL. For example: Once you have removed the script (and saved the changes), you can load your site normally. This is one of the URL paths and URL queries I describe in this article: Squarespace URL Queries. Did this help? Please give feedback by clicking an icon below ⬇️ Lauren_C and creedon 2 About: SQSP User for 17 yrs. Circle Leader since 2017. I value honesty, transparency, diversity and good design ♥. Work: Founder of SF Digital, building Squarespace Extensions to supercharge your commerce website. Content: Links in my posts may refer to SF Digital products or may be affiliate links. If my advice helped, you can thank me by clicking one of the feedback emojis below. I love coffee too. 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