Viewing 2 replies - 1 through 2 (of 2 total)
  • Not sure if this will work, but I do something similar. I go by the no-www.org approach, and since you are doing the opposite, it should be like this…

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

    basically the same thing that you have now, except with the [NC] at the end of the cond line. It works in reverse for all of my blog pages, so I imagine it will work for you.

    edit: just realized you may have wanted the wp directory included. if so give this a try

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

    Thread Starter Success

    (@success)

    Do you put that in the wordpress or the main directory?

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘.htaccess – How to redirect to www. url?’ is closed to new replies.