Webiness
Please Login or Register

Knowledgebase

How do I require users to enter "www" with my domain name?

To force the use of "www" when viewers are viewing your site, add the following mod_rewrite rule to your .htaccess file:

    RewriteEngine On
    RewriteCond %{HTTP_HOST} !^www\.example\.net$ [NC]
    RewriteRule ^(.*) http://www.example.net/ [L,R]


This will ensure that anyone just typing your domain name in their browser ends up with the full name instead.



Was this answer helpful?

Add to Favourites Add to Favourites

Print this Article Print this Article

Also Read
What is LAMP? (Views: 1938)

Quick Navigation

Client Login

Email

Password

Remember Me

Search