HTML

From The System Administrator Zone

HTML Redirect

You may occasionally find yourself in the position where you have to create an "HTML redirect". This is a client-side redirection and tells the browser to request another page.

To create an HTML redirect page, you use the HTML meta tag with the http-equiv and content attributes.

Redirect code

To create an HTML redirect, place the following code between the head tags.

<meta http-equiv="Refresh" content="5; url=http://www.example.com/index.html">

In the above example, the page will redirect to the specified page in 5 seconds.

The content="5; may be changed to the number of seconds you want the browser to wait before redirecting.


Redirect all HTTP to HTTPS

This is how I redirect http requests to the https port on this server:

RewriteEngine on 
RewriteCond %{SERVER_PORT} 80 
RewriteRule ^(.*)$ https://sysadm.equoria.com/$1 [R,L]