How can I force my URL’s to have www at the front?

10 May, 2013 (12:59) | mod_rewrite | By: sblogadmin

How can I force my URL’s to have www at the front?

Use mod_write to force the www in the URL. Inside of a .htaccess file, add the following:

RewriteEngine On
RewriteCond %{HTTP_HOST} ^your-domain\.com [NC]
RewriteRule (.*) http://www.your-domain.com/$1 [R=301,L]

Write a comment