Redirect to a webpage

Last update on December 22, 2008 09:53 AM by jak58
Published by jak58

Redirect to a webpage




Here below you should get an explanantion on how to redirect to a web page using.htaccess or JavaScript

htaccess


The .htaccess is to be placed in the directory that should be redirected.

RedirectPermanent address on path
Example:
RedirectPermanent/software/ http://sofware.mysite.com/ 


More info:

http://httpd.apache.org/docs/1.3/mod/mod_alias.html # redirectperm

Using php header


note: place before any code
<?php
header('Location:absolute or relative path');?>

Using a meta tag


Put between the head tags of your file:
<meta http-equiv="refresh" content="10;url=http://www.kioskea.net/" />

Using JavaScript


Put in the head tags of your page:
function redirect(page) 
   (window.location = page;) 
setTimeout ( 'redirect ( "http://www.kioskea.net/")', 5000); 
/ / 5000 milliseconds = 5 seconds, the time after wich redirection is made
Best answers for « Redirect to a webpage » in :
How to easily display PHP/HTML codes in your webpages Show How to easily display PHP/HTML codes in your webpages Issue What code to use? Issue If you want your visitors to be able to see the source codes of your webpage, there is a very easy way to do so. Normally, all you have to do in a...
[PHP] Redirect depending on specific language Show [PHP] Redirect depending on specific language Many sites require that you choose the language by clicking on an icon for the country. It is possible to detect the default language of the visitor through the information provided by the...
Download Webpage Thumbnailer Show In order to satisfy the users and optimize your websites, it would be better to create thumbnail allowing to preview link contents. This way, the users will not click any more on broken links, pop-up windows etc… Webpage Thumbnailer allows you to...
Saving a webpage ShowSaving a webpage Solution Google Chrome Firefox It may happens that sometimes you can't download a webpage. Solution When the targeted webpage is displayed in your browser For internet explorer select "Page" and choose...
Disabling right click on your webpage ShowDisabling right click on your webpage More than often, while trying so save some text or pictures from a website, you might wonder why your right click is not allowed. This is a simple JavaScript code that has been inserted in the website...
MySQL console: Redirect standard output ShowMySQL console: Redirect standard output MySQL client command must be common to you (mysql), with this small tip you should be able to redirect the output commands to any program? To do this, simply use the pager command, followed by...
Download Diashow xl ShowDIASHOW XL from in-mediakg is an excellent slideshow software for your photos on your PC. You can produce easy and fast specialized slideshows. Advantages: • Create slideshows for PC, TV, CD-ROM, Webpages and DVD-Player. • Add afterwards your...
Webmastering - Introduction to Webpage Creation ShowWebsites A website (also called an Internet site) is a group of HTML files connected by hypertext links and stored on a web server, i.e. a computer that hosts webpages and is permanently connected to the Internet. Why Have a Website? There are...
Managing images in HTML ShowHow do you display images on a web page? Having a few images on a website can make it more attractive and user-friendly. However, it is important not to go overboard, since images can take a long time to load, and in some cases can make a document...
Linux - The shell ShowIntroduction to the shell The command interpreter is the interface between the user and the operating system, hence the name "shell". The shell therefore acts as an intermediary between the operating system and the user thanks to command lines...