Webmaster Forum


Go Back   Webmaster Forum > Web Development > Coding Forum

Coding Forum Problems with your code? Discuss coding issues, including JavaScript, PHP & MySQL, HTML & CSS, Flash & ActionScript, and more.


Reply
 
LinkBack Thread Tools Display Modes
Share |
  #1 (permalink)  
Old 12-24-2008, 06:28 AM
Contributing Member
Latest Blog:
None

 
Join Date: 12-14-08
Posts: 140
iTrader: 0 / 0%
PHP Redirect Code

I can make page redirect to another page using php. But how do i do it so that it will only redirect after a certain period of time instead of instantly.
 
Reply With Quote
  #2 (permalink)  
Old 12-24-2008, 07:40 AM
Matt Wiseley's Avatar
Member
 
Join Date: 12-18-08
Location: New England, USA
Posts: 40
iTrader: 0 / 0%
You don't do that on the server with PHP - instead you use a META tag in the document you want displayed until the redirect happens. This page has example code.

http://webmaster.indiana.edu/tool_gu..._metatag.shtml

Matt
__________________
EditMe - Edit your web.
editme.com
 
Reply With Quote
  #3 (permalink)  
Old 12-24-2008, 10:22 AM
Contributing Member
Latest Blog:
None

 
Join Date: 12-14-08
Posts: 140
iTrader: 0 / 0%
Exclamation Thx! that clears things up

So i can't control how long users will wait before redirected?
 
Reply With Quote
  #4 (permalink)  
Old 12-24-2008, 10:26 AM
Matt Wiseley's Avatar
Member
 
Join Date: 12-18-08
Location: New England, USA
Posts: 40
iTrader: 0 / 0%
Yes, you can - it's timed by the browser. Read the page I linked to.
__________________
EditMe - Edit your web.
editme.com
 
Reply With Quote
  #5 (permalink)  
Old 12-24-2008, 10:30 AM
Cricket's Avatar
V7N Administrator
 
Join Date: 10-13-03
Location: Texas
Posts: 40,376
iTrader: 0 / 0%
Google Strongly Recommends 301 Redirect Over Meta Refresh Redirects
http://www.seroundtable.com/archives/016431.html
__________________
GNC Web Creations - Free Search Engine Optimization (SEO) Training Class
Website Development Training - Website Development Training Blog

Join V7N on Facebook today! facebook.com/V7Network
 
Reply With Quote
  #6 (permalink)  
Old 12-24-2008, 10:30 AM
Contributing Member
Latest Blog:
None

 
Join Date: 12-14-08
Posts: 140
iTrader: 0 / 0%
Ah, i got it.

Thx
 
Reply With Quote
  #7 (permalink)  
Old 12-24-2008, 11:00 AM
lordspace's Avatar
Contributing Member
 
Join Date: 05-30-06
Location: Canada
Posts: 913
iTrader: 0 / 0%
Redirect to http://example.com/ after 5 seconds:
<meta http-equiv="refresh" content="5;url=http://example.com/" />

Source: http://en.wikipedia.org/wiki/Meta_refresh
 
Reply With Quote
Go Back   Webmaster Forum > Web Development > Coding Forum

Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
rewrite code to redirect google image results to homepage littlephoenix SEO Forum 8 10-29-2008 02:59 PM
Google Analytics old code vs new code m42 Google Forum 0 03-29-2008 12:04 AM
Page Redirect Code Red devil SEO Forum 3 10-30-2007 06:20 AM
Google Code Search - Code Search Engine from the Big G Avinash Coding Forum 2 10-05-2006 10:10 PM


V7N Network
Get exposure! V7N I Love Photography V7N SEO Blog V7N Directory


All times are GMT -7. The time now is 02:07 PM.
Powered by vBulletin
Copyright © 2000-2013 Jelsoft Enterprises Limited.
Copyright © 2003 - 2013 Escalate Media LP




Search Engine Optimization by vBSEO 3.6.0 RC 2 ©2011, Crawlability, Inc.