WordPress.org

Ready to get started?Download WordPress

Forums

Requiring the WWW (3 posts)

  1. bazy
    Member
    Posted 4 years ago #

    hi

    I want to force my wordpress website to http://www.domain.com instead of domain.com.

    I have added this in to my .htaccess file:

    Options +FollowSymLinks
    RewriteEngine On
    RewriteBase /
    
    # require non-empty HOST header
    RewriteCond %{HTTP_HOST} !^$
    
    # require case-insensitive HOST to be www.domain.com
    RewriteCond %{HTTP_HOST} !^www\.domain\.com$ [NC]
    
    # 301 redirect everything to correct www.domain.com
    RewriteRule ^(.*)$ http://www.domain.com/$1 [R=301,L]

    But i get Redirect Loop.

    Please help me to fix this.

    thanks

  2. bazy
    Member
    Posted 4 years ago #

    problem resolved.

  3. amalroy
    Member
    Posted 4 years ago #

    Go To Dashboard> Settings> General Settings > Blog address (URL). Just change it instead of the steps you have done. You'll get what exactly you wanted.

Topic Closed

This topic has been closed to new replies.

About this Topic