BLOG HOME -  UK WEB HOSTING -  PHP MYSQL HOSTING -  RESELLER HOSTING -  eUKhost FORUMS -  VPS HOSTING

forwarding website to secure URL

To forward your website to secure URL you need to put the following redirect rule in .htaccess under public_html.

RewriteEngine on
Options +FollowSymLinks
RewriteCond %{SERVER_PORT} !^443$
RewriteRule ^.*$ https://%{SERVER_NAME}%{REQUEST_URI} [L,R]

This code will redirect http://yourdomain.com to https://yourdomain.com.

To use this rule mod_rewrite module should be installed on the server by default.

digg this


This post is compiled by eUKhost.com

Leave a Comment

You must be logged in to post a comment.