• I noticed that my site was dropping the www. prefix which is terrible for me as my main site uses it. (as most others do)

    So after two months of splitting PR I need to rectify this.

    I am using version 1.5

    So I followed the documentation and in Admin section I changed the WordPress URL and site URL and updated it.

    Then I updated the permalinks – and it looked correct with the www. prefix.

    I can navigate correctly in the Blog and the www. shows but when I point to the home page it redirects to https://domainname.com instead of https://www.domainname.com

    So I just think I have to fix the home page redirect.
    (1.5 has no cache -right- so I don’t think that is the problem..)

    And help those people who linked to the non www prefix site.

    This is the first 10 lines of my .htaccess file:

    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /archives/
    RewriteCond %{REQUEST_FILENAME} -f [OR]
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule ^.*$ – [S=39]
    RewriteRule ^feed/(feed|rdf|rss|rss2|atom)/?$ /archives/index.php?&feed=$1 [QSA,L]
    RewriteRule ^(feed|rdf|rss|rss2|atom)/?$ /archives/index.php?&feed=$1 [QSA,L]
    RewriteRule ^page/?([0-9]{1,})/?$ /archives/index.php?&paged=$1 [QSA,L]
    RewriteRule ^comments/feed/(feed|rdf|rss|rss2|atom)/?$ /archives/index.php?&feed=$1&withcomments=1 [QSA,L]

    I tried inserting this:

    RewriteCond %{HTTP_HOST} ^domain.com$ [NC]
    RewriteRule ^(.*)$ https://www.domain.com/$1 [R=301,L]

    but it didn’t seem to work.(unless in wrong location)

    Please help.

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Permalinks and Options don’t redirect to www. for home page’ is closed to new replies.