• hi

    I want to force my wordpress website to https://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 ^(.*)$ https://www.domain.com/$1 [R=301,L]

    But i get Redirect Loop.

    Please help me to fix this.

    thanks

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Requiring the WWW’ is closed to new replies.