![]() |
|
|
|
|
A PHP Redirect automatically transfers a web user from one URL to another. For example, typing foo.com in the browser automatically transfers the user to another URL bar.com.
The PHP Redirect command:
Replace [some-url] with the URL where you want the redirection to take place.
For example,
header("location: ./version2/index.html");=>redirect to "index.html" page in subfolder called "version2"
header("location: http://www.yahoo.com");=>redirect to a website called yahoo.com
If PHP is not available, it's also possible to use other redirects:
* HTTP Redirects
Replace [time] with seconds. This will pause the browser for the specified number of seconds. Replace [some-url] with the target URL you want to redirect.
For example,
The above HTTP based redirect needs to be in the region of the HTML code.
* JavaScript Redirects
setTimeout("location.href='[some-url]'", [time]);
Replace [time] with milliseconds. This will pause the browser for the specified number of seconds. Replace [some-url] with the target URL you want to redirect.
For example,setTimeout("location.href='http://www.yahoo.com'", 5000);
The above JavaScript based redirect can be either in the or region of the HTML code.
Usually a PHP redirect is much more reliable than other form of redirects like HTTP redirect or JavaScript based redirects. For example a JavaScript redirect may not work if a user's browser settings has JavaScript turned off.
The reason why PHP redirects will work no matter what settings users have on their browser is because PHP is server side script. It will not depend on browser settings that may affect JavaScript which is parsed on the client-side/user-side.
About the Author
Sanjib Ahmad, Freelance Writer and Product Consultant for http://www.marc8.com.
You are free to use this article in its entirety as long as you leave all links in place, do not modify the content, and include the resource box listed above.
Web Development Methodology Followed by a Web Development Company Online PR News (press release) Proper planning and following a strategic process is cardinal to a web development company to develop bleeding-edge applications using web development ... |
Big Star Media Group Partners With Graphic Design / Web Development Firm PR Newswire (press release) CLARKSDALE, Miss., July 29 /PRNewswire-FirstCall/ -- Big Star Media Group, Inc. (Pink Sheets: BMGI) (the "Company") a diversified entertainment and ... |
Think About Web Development For the iPhone Boosh News (press release) (blog) A free laptop for students is definitely something that will be put to good use. Would you like to get a yourself or a student a high quality new laptop, ... |
Web Development Is a Broad Term That May Entail Web Designing, Content Writing ... SBWire (press release) Wildnet Technologies is a Web development company India to ensure that the needs of all those who require an effective website are met efficiently and ... |
Graphic Design and Web Development Coordinator Animation World Network Graphic Design and Web Development Coordinator. This position works with both the Graphic Design Manager and Web & E-Communications Manager in support of ... |
OpenXcell to Offer Drupal Web Development Services to World Wide by '10 SBWire (press release) To meet the online marketing needs, OpenXcell Technolabs is now offering with the Drupal web development services. The firm is offering its services at a ... |
![]() Metromode Media | Web Development Intern Metromode Media Web Development Internship Blue Sky Sessions, a small web development firm in Holland, Michigan, is seeking a paid web development intern to start work ... |
Sparsh Technologies Offers Complete Joomla Development Services for Web ... Online PR News (press release) Sparsh Technologies aids web development in Australia by providing array of Joomla development services to the local Australian businesses. ... Hire Good Joomla Developers India to get Proficient Joomla Websites |
ForeSite Technologies Executive Vice President Named 40 Under Forty PR Web (press release) Benjamin Sweet honored by Hartford Business Journal – ForeSite, a web development, web design and computer support firm based in East Hartford, ... |
SDLC Methodology and its Benefits to a Web Development Company Jazzou (blog) In this competitive world of software development to survive Darwin's theory of survival of the fittest it is important that a web development company ... |
|
home | site map home
: domain name
: web design
: e-commerce
: smart update
: optimization
: promotion © copyright 2002-2006 | i5networks.com - A Bailey Mac Media Company| all rights reserved |
| © 2006 |