Welcome to WebmasterWorld Guest from 54.146.221.231

Forum Moderators: open

Message Too Old, No Replies

how to make a redirect page

     
11:34 pm on May 22, 2003 (gmt 0)

New User

10+ Year Member

joined:May 14, 2003
posts:14
votes: 0


what is the code to redirect to a different page
12:03 am on May 23, 2003 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Mar 15, 2002
posts:971
votes: 0


Welcome to Webmaster World :)

Try a search, I'm certain you'll find what you are looking for.

2:34 am on May 23, 2003 (gmt 0)

Junior Member

10+ Year Member

joined:Apr 16, 2003
posts:110
votes: 0


<META HTTP-EQUIV="Refresh" CONTENT="3; url=http://www.#.com">

"3" is how many seconds till the page redirects

4:28 am on May 23, 2003 (gmt 0)

Junior Member

10+ Year Member

joined:May 22, 2003
posts:61
votes: 0


If you're using ASP you can do the following:

<%
response.buffer = true

NextPage = "http://..."
response.redirect NextPage
%>

However, you do not have control over the time element. It redirects immediately.

8:53 am on May 23, 2003 (gmt 0)

Senior Member from US 

WebmasterWorld Senior Member keyplyr is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:Sept 26, 2001
posts:5810
votes: 64



Some search engines will not index the referring page, just the destination. Other SEs may interpret a meta refresh as SPAM. Placing your redirect code in an external file will avoid both.

Create a .txt file with this:

window.location.replace("http://www.your_domain.com/page.html")

Rename it as a JS file, example: redirect.js

Then in the HEAD section of the redirecting page, add:

<script type="text/javascript" src="/redirect.js"></script>

Note: Also redirects immediately.

5:37 pm on May 23, 2003 (gmt 0)

Senior Member

WebmasterWorld Senior Member korkus2000 is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:Mar 20, 2002
posts:3732
votes: 0


Server side is the best way to go unless you are OK with a link on the page for SEs and nonjavascript users.