Redirect Script!

  • 1
  • Question
  • Updated 9 years ago
  • Answered
Can anyone give me a redirect script , so I can redirect to an external site thorugh one of my pages.
Photo of YorkshireNerd

YorkshireNerd

  • 56 Posts
  • 0 Reply Likes

Posted 10 years ago

  • 1
Photo of Peter

Peter

  • 2569 Posts
  • 113 Reply Likes
Hello Perko,

here is a script which works well

<!--
<meta http-equiv="refresh" content="2; url=http://site.com">
-->

It works in the builder as well.

What I suggest is to set the timing to 30 (seconds) to allow you to observe how well it functions. Then when you're happy change it to 2 (seconds). The reason being is that you cannot modify it when it's at 2 seconds as it will be re-directing even in the builder.

If that were the case, ie the redirect didn't work your only option would be to delete the page and set it up again.
Photo of William

William

  • 294 Posts
  • 0 Reply Likes
boomer, can u do it step by step for me please?
Photo of lambofgod

lambofgod

  • 875 Posts
  • 35 Reply Likes
I'm not boomer but I will try to explain:
1.) Drag and drop an html widget wherever you want on your page.
2.) Copy and paste the code givin by Peter above without the <!-- and -->
3.) Change the url to that site that you want it to redirect to.
4.) Change the content="2" to however long you want it to take to redirect. I do advise you to have put at least 2 so you will have to time hit "Ok" and then click "Save" since this will redirect you in the site builder.
Photo of smithy

smithy

  • 1222 Posts
  • 28 Reply Likes
lambofgod i know you are not boomer but you are right!! star
Photo of William

William

  • 294 Posts
  • 0 Reply Likes
thanks dan, very much..
Photo of William

William

  • 294 Posts
  • 0 Reply Likes
dan, call me thick, and your right lol but I cannot get the intro page to be before the index page lol... I made the intro page but I am unsure how to make it the homepage,. hope u understand me coz I dont lol.
Photo of Sanja

Sanja, Official Rep

  • 10698 Posts
  • 495 Reply Likes
Hi William

The page called "index" in the Site Builder is your default home page and the first page your site will open on. To make the intro page be the first page - then please follow these steps:

1. Save the current index page with a new name using Save > Save As (this is if you want to keep the content on that page and not re-add it later).
2. Then save the page you would like to be your index page also using the Save > Save As function and calling it 'index' (make sure that you use the lower case i, not a capital I).
3. It will ask whether you want to overwrite the existing index page - say yes.
4. You will have a duplicate of pages, you can delete the old one in the Site Manager.
Photo of lambofgod

lambofgod

  • 875 Posts
  • 35 Reply Likes
Thanks Littleus :D
Photo of William

William

  • 294 Posts
  • 0 Reply Likes
thanks alot..appreciate that..
Photo of William

William

  • 294 Posts
  • 0 Reply Likes
I think I will give this a miss, It messed up everything, thanks anyway...
Photo of Emmy

Emmy

  • 5892 Posts
  • 299 Reply Likes
Hi William,
Let us know if we can help you get things back in order. I would just like to explain a bit further that whatever page is your "index" page, this is the page your site has to open up to. So if you have an entry page that you want to be the first page your site visitor lands on, this needs to be the index page. Is that possibly where the confusion was? I think maybe you were trying to get your entry page to appear before the index page, which isn't possible. Have you been able to get the page that you want to be the homepage to be the homepage? Let us know if we can help at all.

Emmy
Photo of Pablo

Pablo

  • 39 Posts
  • 0 Reply Likes
Reference to the comment in a posting above :
"4.) Change the content="2" to however long you want it to take to redirect. I do advise you to have put at least 2 so you will have to time hit "Ok" and then click "Save" since this will redirect you in the site builder."

Is this valid ?

I tried the script and it works well, but I do not see a page redirection in the site builder.
Has Yola modified the code to prevent this code executing in the site builder?
If Yes, can I set the redirect time to "0" seconds, which would be my preference in this particular case ?

Thanks
Photo of Sanja

Sanja, Official Rep

  • 10698 Posts
  • 495 Reply Likes
Hello Pablo

I do not believe there is any code put in place to prevent the redirect from happening in your Sitebuilder.

I hope this answers your question. Please let me know if it does not.
Photo of smithy

smithy

  • 1222 Posts
  • 28 Reply Likes
to comfirm sanja's post. the redirect code will redirect in the site builder!!
Photo of Pablo

Pablo

  • 39 Posts
  • 0 Reply Likes
That is strange.
I find that it does not redirect in the site builder, which I prefer of course.
The script redirects correctly on the published page, so it is definite behaving as expected.
Thanks
Photo of t.white.avp

t.white.avp

  • 2 Posts
  • 0 Reply Likes
it redirects just fine but then it says optimizing images forever and never lets me actually save the page...what does that mean?