HTML Question
- Started
- Last post
- 14 Responses
- CygnusZero4
How do you have a blank webpage forward to a different url as soon as it's loaded?
I'm searching around and making i'm not searching for the right thing but I cant find it. And its Friday and my brain isnt working well.
- Corvo20
In case you don't know how to work with htaccess files you can always do a meta header redirect.
- Thats good, because the htaccess thing isnt working for me.CygnusZero4
- look belowCorvo2
- jay_tuck0
The best thing to do is get into your hosting control panel and forward it to where ever it needs to go. Failing that, try this:
Before </head> paste this:
<script type="text/javascript">
<!--
function MM_goToURL() { //v3.0
var i, args=MM_goToURL.arguments; document.MM_returnValue = false;
for (i=0; i<(args.length-1); i+=2) eval(args[i]+".location='"+args[i+1]+"'");
}
//-->
</script>Add a blank image to the page and paste this in the <img> tag:
onload="MM_goToURL('parent','Des... URL');return document.MM_returnValue"
Ex: <img src="{blank.gif}" " onload="MM_goToURL('parent','Des... URL');return document.MM_returnValue"/>
- this is the most convoluted solution i can imagine. Seeing MM_ indicates why.heavyt
- baseline_shift0
hows that cargofolio coming? :)
- Good, I realized I can just have my domain forward to the cargo page instead of messing around with all that crap.CygnusZero4
- ok_not_ok0
<html>
<script>
location = "http://www.paulpotts.com.au";
</script>
</html>
- Corvo20
several different options here (mod_rewrite, php, javascript, etc):
http://www.somacon.com/p145.php
- CygnusZero40
Wow that was a big mistake messing with that htaccess thing. Not only didnt it work, but my entire site is down now. Sweet. It messed something up.
- Ruffian0
Make sure your ftp client sees hidden files. Then erase the .htaccess
- Hmmm im using filezilla on the mac. Dont even see the option.CygnusZero4
- NoFavorite0
I'd go with Corvo2's suggestion. I think the meta solution is the best.
<meta http-equiv="refresh" content="0;url=http://www.somacon.com/">
- epic_rim0
meta refresh ftw
- Corvo20
i think you can type "rm .htaccess" in the command line
or just upload an empty .htaccess file to get your site back (make sure there are no blank spaces in the file, which is probably why the other one doesn't work)
- acescence0
if you are forwarding your domain to a cargo folio, a 301 redirect is the proper way to do it.
using meta refresh to forward outside your domain is seen as a spammer technique and will get you penalized in most search engines
- Not concerned about seach engines though. But thanks for pointing out. Good to know.CygnusZero4
- Hrm. Never knew that.NoFavorite