Link to home
Start Free TrialLog in
Avatar of ammadeyy
ammadeyy

asked on

url redirect

when a user open the page, it should automatically redirect to another site, how can i do this
ASKER CERTIFIED SOLUTION
Avatar of rbartz
rbartz

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial

I personally think the meta tag is the nice way...  It will work regardless of whether JavaScript is enabled or not.
<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1256">
<meta HTTP-EQUIV="Refresh" CONTENT="0;URL=http://www.yoursie.com/newpage.htm/">
<title>Welcome</title>
</head>

<body>

</body>

</html>
Avatar of Nish_since1981
Nish_since1981

Hi ,

<script
<html>
<body onload ="document.form.submit();">
<form  action= "url  of the site">
</form>
</body>
</html>
All the ways mentioned above are fine, but as we are in the ASP section here is how you redirect using ASP code.

<%
Response.Redirect("http://www.yoursie.com/newpage.htm")
%>
Sorry FSIFM...

This is web development, but not ASP...

I am curious though, will

<meta http-equiv="refresh" content="0;url=http://www.theothersite.com/page.html" />

work in the header of an ASP page?
Hello...

Do whatever you want, but please note that basicinstruct and gawai simply agreed with my initial answer, and Nish_since1981 only suggests an alternative javascript method no more effective but more complex than I did.

FSISM wrongly thought that this was the ASP section, and gave an answer that was not generic enough for any but ASP pages.

Thanks.

R