[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 134
  • Last Modified:

How Can I Send An Url To The User?

how can i do that when the user will enter to my site it will auto send him to other url?
0
saar071697
Asked:
saar071697
1 Solution
 
knightEknightCommented:
You could set your web sites default page to the page you want them to see, or you could specify this in the onLoad event of your index.html file like this:

<BODY onLoad='top.location="www.myother.url";'>
0
 
punkerCommented:
Something like this will solve your problem:

<HTML>
<HEAD><TITLE>Redirecting To Our New WebSite</TITLE></HEAD>
<SCRIPT LANGUAGE="JavaScript">
<!--HIDE
function OurNewSite(){
   setTimeout("window.location.replace('http://ournewsite.com/')", 7000)
}
//STOP HIDING-->
</SCRIPT>
<BODY onLoad="OurNewSite()">
<H1>Our site has moved!</H1>
You will now be redirected.<br>
<br>
If you are not redirected in a moment, please <a href="http://ournewsite.com">Click here to continue</a>.
</BODY>
</HTML>

If you would like to redirect seamlessly (without a waiting period), you may remove the javascript and replace <BODY onLoad="OurNewSite()"> with <BODY onLoad="window.location.replace('http://ournewsite.com')">

Incidentally, if you are using ColdFusion, you can also use <CFLOCATION URL="http://ournewsite.com">.

To my knowledge, there is no way to do this via straight HTML.
0
 
punkerCommented:
Sorry knightEknight... we must've been busy answered at the same time, the question was untouched when I started replying.
0
Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

 
punkerCommented:
Or answering.
0
 
limcuandoCommented:
saar,

Do you have meta tags in your index (or default) page?

If not, try this:

<HTML>
<HEAD>
<META HTTP-EQUIV="REFRESH" content="0; url=http://www.youraddress.com">
</HEAD>

This tag should automatically redirect the visitor to the new page (http://www.youraddress.com) without waiting (0 seconds).
0
 
saar071697Author Commented:
no, you got me all worng
i need that it will open it in a new browser window
0
 
saar071697Author Commented:
no, you got me all worng
i need that it will open it in a new browser window
0
 
rupertsCommented:
<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
function newwin() {
window.open('http://www.yourserver.com/page-to-open.html','','toolbar=no,menubar=no,location=no,height=500,width=500');
}
// End -->
</SCRIPT>


<BODY onLoad="newwin()">

Problem solved! (I hope) You can change the hight,width etc of the new window if you wish to!
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now