Blog

« Back

Auto add www with mod rewrite

Author: Milen Hristov
Created on: 08.03.2013 09:39

This is easy solution how to automaticaly add "www" on web page. Put the following code to your .htaccess file.

RewriteEngine on
RewriteBase /
RewriteCond %{HTTP_HOST} ^[a-z|\-]+\.[a-z]+$ [nc]
RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [L,r=301,nc]




No comments

Comments

Name

E-mail

Comment

Enter the text from the image

Blog tags