View Full Version : Site Redirect
jessomine
09-21-2005, 11:21 PM
Hi guys and gals, g. Again I'm requesting help. I figured out the code (below) to redirect my site from free geocities to my own .com. It does work, but the address (in the address bar) at the new site retains the geocities url address even when clicking on to a 2nd, 3rd .. etc page at the new site. Is there a code to correct this ?
My redirect html code:
<META HTTP-EQUIV="Refresh" CONTENT="8; URL=http://www.jessomine.com" />
Really appreciate help.
is it possible geocities have some code to prevent that?
Bogie
09-21-2005, 11:41 PM
I know that, at one time, they stated that redirects were not allowed. They did not want their service to be redirected to "who knows where".
jessomine
09-21-2005, 11:46 PM
You're likely right Bogie and Tim as I notice the code works fine for other servers. BUT .. wouldn't there be a code I can use on the new site index page to refresh the browser to show the correct url?
Jackthemeangiant
09-22-2005, 01:03 AM
Trying doing it this way using Javascript, it might give you the desired result:
<head>
<script language="JavaScript">
<!--
// Put your redirect URL here
var sTargetURL = "index.htm";
// The number 3 here is the number of seconds to wait
function doRedirect()
{
setTimeout( "timedRedirect()", 3*1000 );
}
// There are two definitions of 'timedRedirect', this
// one adds to the visitors page history.
function timedRedirect()
{
window.location.href = sTargetURL;
}
//-->
</script>
<script language="JavaScript1.1">
<!--
function timedRedirect()
{
window.location.replace( sTargetURL );
}
//-->
</script>
</head>
<body bgcolor="#006600" onload="doRedirect()">
ChrisK
09-22-2005, 11:53 AM
Hi guys and gals, g. Again I'm requesting help. I figured out the code (below) to redirect my site from free geocities to my own .com. It does work, but the address (in the address bar) at the new site retains the geocities url address even when clicking on to a 2nd, 3rd .. etc page at the new site. Is there a code to correct this ?
My redirect html code:
<META HTTP-EQUIV="Refresh" CONTENT="8; URL=http://www.jessomine.com" />
Really appreciate help.
Hi jessomine,
You can use the following javascript code on the pages you have hosted on GeoCities to point to your jessomine.com domain name.
<html><head>
<script language="JavaScript">
<!--
function gotoPage()
{ var dns1 = "geocities.com"
var dns2 = "www.geocities.com"
var urlloc = location.href
var loc = urlloc.toLowerCase()
if (loc.indexOf(dns1) != -1)
location.href="http://www.jessomine.com"
if (loc.indexOf(dns2) != -1)
location.href="http://www.jessomine.com"
}
//-->
</script>
</head><BODY onLoad="gotoPage()"></body></html>
jessomine
09-23-2005, 06:57 PM
It's a b*tch, g. Tried both the javascripts and sames results. At the new site, the geocities address url is displayed no matter what page one is viewing. One other thing I didn't mention above - the Geocities/Yahoo pop-up Ad has to be clicked off at the new site, but thankfully it doesn't reappear on subsequent pages.
The url for the old site : http://www.geocities.com/jessominek
Now, wouldn't there be a javascript I could put on the new site to change the address in the browser?
One other thing, will this 'redirect' using the javascript work for any browser? Just wondering if I should have a manual link on the page also.
Thanks so much,
Bogie
09-23-2005, 07:47 PM
Is it even being redirected? Have you placed a marker on the page that is on your domain so that you know? I know that Geocities used to automatically disable redirects.
jessomine
09-23-2005, 07:53 PM
Yes, Bogie, it is being redirected. When one clicks on the <enter> link, it goes to the next page of the new site. There is now only the one (redirect) page of the geocities site.
ChrisK
09-23-2005, 11:47 PM
Yes, it is being redirected...in the geocities frame.
I would suggest trying the following code (note: I have not tested it)
<html><head>
<script language="JavaScript">
<!--
function gotoPage()
{ var dns1 = "geocities.com"
var dns2 = "www.geocities.com"
var urlloc = location.href
var loc = urlloc.toLowerCase()
if (loc.indexOf(dns1) != -1)
parent.location.href="http://www.jessomine.com"
if (loc.indexOf(dns2) != -1)
parent.location.href="http://www.jessomine.com"
}
//-->
</script>
</head><BODY onLoad="gotoPage()"></body></html>
As per your other question, it wouldn't hurt to have a link displayed if the redirect don't work. If the browser doesn't support javascript, then the page will not redirect.
jessomine
09-24-2005, 06:52 PM
Thanks Chris K. Tried that as well and same result. Biggest buggaboo is if one bookmarks the site, it saves the geocities link.
jessomine
09-24-2005, 08:01 PM
<META HTTP-EQUIV="pragma" CONTENT="no-cache">
:mbx:
This would remove the address - Yes/No?
If so if I replace "no-cache" with my current .com address, would it replace the geocities site url? I have to wait until later on tonight to try it so I thought I'd run it by you guys. Just in case someone comes along to see how I've made out.
Bogie
09-24-2005, 08:49 PM
Following this with deep interest as I have an old site on Geocities, from way back, and I would to direct it to my domain also, where I have the same site running.
jessomine
09-25-2005, 02:09 AM
I think I know what I need but I need help with the script.
That pop-up ad in geocities can be blocked using a frame breaking
javascript that loads when your webpage loads. So if this script runs prior to the redirect geocities frame won't transfer over. If I figure out the js, I'll post it here Bogie, otherwise, I'm hoping someone else can help out.
BTW, the above "no-cache" didn't work, vbg.
Bogie
09-25-2005, 06:34 AM
I haven't checked all codes posted yet, but have you tried a redirect on the page on your domain? A redirect and framebreak on your "new domain" site, to a secondary page (main.html) for example, with all internal pages referring to your "new" main page. The only purpose of the "index.html" page would be for internal redirection and frame breaking.
OR ... the redirect from Geocities could be to a page on your site that is set-up to "receive" it and redirect to your proper index.html
ChrisK
09-25-2005, 11:46 AM
I haven't checked all codes posted yet, but have you tried a redirect on the page on your domain? A redirect and framebreak on your "new domain" site, to a secondary page (main.html) for example, with all internal pages referring to your "new" main page. The only purpose of the "index.html" page would be for internal redirection and frame breaking.
OR ... the redirect from Geocities could be to a page on your site that is set-up to "receive" it and redirect to your proper index.html
Good idea James!
Try this:
On the Geocities side use the code I suppied above (1st version) but replace
'http://www.jessomine.com' with 'http://www.jessomine.com/breakframe.htm'
The breakframe.htm page will have the following code on it only:
<script
language="JavaScript"
<!-- if(parent.frames.length>=1 { window.top.location.href="index.htm"
} // --></script>
So as James suggested...on Geocities site...you do the redirect on your domain site...you do a break frame...this should resolve the issue.
untested.
ChrisK
09-25-2005, 12:15 PM
You might be able to combine both into one JS.
<html><head>
<script language="JavaScript">
<!--
function gotoPage()
{ var dns1 = "geocities.com"
var dns2 = "www.geocities.com"
var urlloc = location.href
var loc = urlloc.toLowerCase()
if (loc.indexOf(dns1) != -1)
window.top.location.href="http://www.jessomine.com"
if (loc.indexOf(dns2) != -1)
window.top.location.href="http://www.jessomine.com"
}
//-->
</script>
</head><BODY onLoad="gotoPage()"></body></html>
ChrisK
09-25-2005, 12:25 PM
You might be able to combine both into one JS.
<html><head>
<script language="JavaScript">
<!--
function gotoPage()
{ var dns1 = "geocities.com"
var dns2 = "www.geocities.com"
var urlloc = location.href
var loc = urlloc.toLowerCase()
if (loc.indexOf(dns1) != -1)
window.top.location.href="http://www.jessomine.com"
if (loc.indexOf(dns2) != -1)
window.top.location.href="http://www.jessomine.com"
}
//-->
</script>
</head><BODY onLoad="gotoPage()"></body></html>
Tested and works on local computer.
jessomine
09-25-2005, 04:49 PM
Good idea James!
Try this:
On the Geocities side use the code I suppied above (1st version) but replace
'http://www.jessomine.com' with 'http://www.jessomine.com/breakframe.htm'
The breakframe.htm page will have the following code on it only:
<script
language="JavaScript"
<!-- if(parent.frames.length>=1 { window.top.location.href="index.htm"
} // --></script>
So as James suggested...on Geocities site...you do the redirect on your domain site...you do a break frame...this should resolve the issue.
untested.
So far, I've done the above and I get to the 'new' breakframe.htm with no sign of Geocities's url nor the ad. Few attempts to redirect to my 'new' index.htm and still working on it, g.
jessomine
09-25-2005, 05:17 PM
Bogie and Chris .. yippee this works:
Below is my 'breakframes.htm' page on my new site.
html>
<head>
<title>Breakframe</title>
<script language="JavaScript" <!-- if(parent.frames.length>=1 { window.top.location.href="index.htm" } // --></script>
<script language="JavaScript">
<!--
var sTargetURL = "http://www.jessomine.com/index.htm";
function doRedirect()
{
setTimeout( "timedRedirect()", 0*1000 );
}
function timedRedirect()
{
window.location.href = sTargetURL;
}
//-->
</script>
<script language="JavaScript1.1">
<!--
function timedRedirect()
{
window.location.replace( sTargetURL );
}
//-->
</script>
</head><body bgcolor="#A8C0D9" onload="doRedirect()">
</body>
</html>
Below is my index.htm page on Geocities:
<script language="JavaScript">
<!--
function gotoPage()
{ var dns1 = "geocities.com"
var dns2 = "www.geocities.com (http://www.geocities.com/)"
var urlloc = location.href
var loc = urlloc.toLowerCase()
if (loc.indexOf(dns1) != -1)
parent.location.href="http://www.jessomine.com/breakframe.htm"
if (loc.indexOf(dns2) != -1)
parent.location.href="http://www.jessomine.com/breakframe.htm"
}
//-->
</script>
To see how fast it works goto: http://www.geocities.com/jessominek
Thanks so much guys for all your help.
Bogie
09-25-2005, 05:30 PM
http://www.geeksmedia.com/tcm/emoticons/cool.gif
Teamwork!
ChrisK
09-25-2005, 06:09 PM
great teamwork james...we should work on more projects :)
jessomine
09-25-2005, 07:55 PM
Thought I'd tell you two that when I was researching the redirect 'question', I found that there are tons of people wondering how to redirect from geocities, hahahaha.
ChrisK
09-25-2005, 08:01 PM
Thought I'd tell you two that when I was researching the redirect 'question', I found that there are tons of people wondering how to redirect from geocities, hahahaha.
uuumm....well that script will go on your tab.
we will both share the royalties of $0.00
Bogie
09-25-2005, 08:10 PM
Don't be surprised that, eventually, Geocities may cancel your free webspace. Their rules used to state "no redirects". I haven't checked them recently but I doubt that part has changed.
EDIT: from Geocities rules and regs:
This is why redirects are discouraged and aggressively coded into the Geocities websites.
I know why many want to do it, because of finally getting their own domains and "real" webspace, but .....
You agree to not use the Service to:
(o) use your home page (or directory) as storage for remote loading or as a door or signpost to another home page, whether inside or beyond Yahoo GeoCities;
12. TERMINATION
You agree that Yahoo, in its sole discretion, may terminate your password, Yahoo GeoCities Site, use of the Service or use of any other Yahoo service, and remove and discard any Content within the Service, for any reason, including, without limitation, for lack of use or if Yahoo believes that you have violated or acted inconsistently with the letter or spirit of the TOS. Yahoo may also in its sole discretion and at any time discontinue providing the Service, or any part thereof, with or without notice. You agree that any termination of your access to the Service under any provision of this TOS may be effected without prior notice, and acknowledge and agree that Yahoo may immediately deactivate or delete your Yahoo GeoCities Site and all related information and files in your Yahoo GeoCities Site and/or bar any further access to such files or the Service. Further, you agree that Yahoo shall not be liable to you or any third-party for any termination of your access to the Service.
David
09-25-2005, 09:18 PM
I just went to www.jessomine.com and it didn't show a geocities address in the address bar.. it was just :
www.jessomine.com
ChrisK
09-25-2005, 10:06 PM
I just went to www.jessomine.com and it didn't show a geocities address in the address bar.. it was just :
www.jessomine.com
To test it out visit:
http://www.geocities.com/jessominek
Powered by vBulletin® Version 4.1.7 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.