Back to General Articles

www or not www
by Pcwolfx® 23 Dec 2011

hi guys,
if you want use for your web link this style: http://www.example.com;

Open your .htaccess files and add this part:

Code:
RewriteEngine On
RewriteCond %{HTTP_HOST} !^www\.example\.com
RewriteRule (.*) http://www.example.com/$1 [R=301,L]
Note: Edit example and com line.

If you not want the www (http://example.com) your web links, add this part and edit it;

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

vblts.ru supports vBulletin®, 2022-2024