Stats: 3,190,631 members, 7,941,439 topics. Date: Friday, 06 September 2024 at 07:05 AM |
Nairaland Forum / Science/Technology / Webmasters / Redirect Code (780 Views)
Help! Blog Title Won't Redirect To Home Page (pictured) / Adsense - Difficult To Navigate, Redirect, Pop Up Issues? / How To Redirect 1and1 Domain To Your Bloggers Blog (2) (3) (4)
Redirect Code by LordReed(m): 11:35pm On Mar 17, 2012 |
Please someone help me with this code: <script language="javascript"> location.replace(" http://www.yournewsite.com"); </script> <meta http-equiv="refresh" content="1; url=http://www.yournewsite.com"> <a href="http://www.yournewsite.com"><font face="arial,helvetica">My new page is here...</ font></a> Can I replace http://www.yournewsite.com with an ip address? |
Re: Redirect Code by Nobody: 12:52am On Mar 18, 2012 |
Hmm for security purposes, i doubt if you can use location.replace for a browser address different from the current one your browser is on. There is a certain restriction law in jscript i dont quite remember clearly. Well, here is how to go about it, use mozilla firefox to run the code, and use the error console to see what error message it returns. I am expecting you to get an access-denied kinda error, your syntax appears correct sha. |
Re: Redirect Code by LordReed(m): 4:07am On Mar 18, 2012 |
@dhtml The code is suppose to automatically redirect the page to the new address. I am a novice in html matters so your help is greatly appreciated. |
Re: Redirect Code by yamakuza: 4:20am On Mar 18, 2012 |
Lord_Reed: Please someone help me with this code: try http://xx.yy.zz/ or http://xx.yy.zz:80/ and see what happens. Where xx.yy.zz is of course, an ip address |
Re: Redirect Code by LordReed(m): 6:22am On Mar 18, 2012 |
Thanks guys, I just checked the website dashboard and it allows me to configure redirects so I'm gonna use that instead of fiddling with the html code. |
Re: Redirect Code by Nobody: 7:16am On Mar 18, 2012 |
Sorry, i was already feeling rather sleepy then. I have not used the location.replace for a long time, but if it does not work, you can always go back to location.href |
(1) (Reply)
8 Steps For Writing Good Content For Your Blog/site / Webmasters, Pls Help Ur Boy!!! / "How To Make Atleast $10 Daily On Fiverr Without Rendering Any Service"
(Go Up)
Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health religion celebs tv-movies music-radio literature webmasters programming techmarket Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10) Nairaland - Copyright © 2005 - 2024 Oluwaseun Osewa. All rights reserved. See How To Advertise. 10 |