I want to redirect an html page on my website (lets say, 1[SUP]st[/SUP] page) to another html page on a different website (lets say, 2[SUP]nd[/SUP] page) and then again from this 2[SUP]nd[/SUP] page back to the 1[SUP]st[/SUP] page on my website. i.e.
Redirect this page:
to:
(referred to as 2[SUP]nd[/SUP] page from here on)
and finally back to:
(referred to as 1[SUP]st[/SUP] page from here on)
I want no more redirects from this point onwards...
I am currently using this code on the 1[SUP]st[/SUP] page (my website):
As you can see that this code redirects the visitors to the 2[SUP]nd[/SUP] page which will then redirect them again back to the 1[SUP]st[/SUP] page.
But the problem with it is that, when the visitors return back to the 1[SUP]st[/SUP] page, they are again redirected back to the page they came from (2[SUP]nd[/SUP] page). Thus, the users end up in an endless loop.
What I would like done is that, when the first time a user gets redirected to the 2[SUP]nd[/SUP] page (from the 1[SUP]st[/SUP] page) and then again back to the 1[SUP]st[/SUP] page (from the 2[SUP]nd[/SUP] page) s/he should not be redirected back again to the 2[SUP]nd[/SUP] page and stay on the same 1[SUP]st[/SUP] page. i.e. the 1[SUP]st[/SUP] page's code redirects the visitors only once when they visit it for the first time to the 2[SUP]nd[/SUP] page, the 2[SUP]nd[/SUP] page then redirects them back to the 1[SUP]st[/SUP] page but here the 1[SUP]st[/SUP] pages' code doesn't redirect them again to the 2[SUP]nd[/SUP] page and so the visitors end up on the 1[SUP]st[/SUP] page.
How can I modify the code above so that it does what I want it to do?
Redirect this page:
Code:
mysite.com/page1.html
Code:
othersite.com/somepage.html
and finally back to:
Code:
mysite.com/page1.html
I want no more redirects from this point onwards...
I am currently using this code on the 1[SUP]st[/SUP] page (my website):
Code:
<meta http-equiv="REFRESH" content="5;url=http://www.othersite.com/somepage.html">
But the problem with it is that, when the visitors return back to the 1[SUP]st[/SUP] page, they are again redirected back to the page they came from (2[SUP]nd[/SUP] page). Thus, the users end up in an endless loop.
What I would like done is that, when the first time a user gets redirected to the 2[SUP]nd[/SUP] page (from the 1[SUP]st[/SUP] page) and then again back to the 1[SUP]st[/SUP] page (from the 2[SUP]nd[/SUP] page) s/he should not be redirected back again to the 2[SUP]nd[/SUP] page and stay on the same 1[SUP]st[/SUP] page. i.e. the 1[SUP]st[/SUP] page's code redirects the visitors only once when they visit it for the first time to the 2[SUP]nd[/SUP] page, the 2[SUP]nd[/SUP] page then redirects them back to the 1[SUP]st[/SUP] page but here the 1[SUP]st[/SUP] pages' code doesn't redirect them again to the 2[SUP]nd[/SUP] page and so the visitors end up on the 1[SUP]st[/SUP] page.
How can I modify the code above so that it does what I want it to do?
Last edited: