Archive

Archive for August, 2007

Redirect http:// to https://

August 17th, 2007

I have been looking online for some time to redirect http:// URL to https:// automatically. So when a user requests vax.org, it will be redirected to https://vax.org.

After several searches, this is what i have found :

RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}

  1. Open your preferred editor
  2. Copy-paste text and save as . htaccess
  3. Upload the file to your root directory (where your main index file is located)
  4. Lastly, CHMOD the file to 775 or 777

You have got yourself a redirection.

SysAdmin