WordPress.org

Forums

[resolved] Enforcing the non-use of www in 3.0.1 (5 posts)

  1. editor
    Member
    Posted 4 years ago #

    Hello,

    before WP 3.0.1 I was using the "Enforce www preference" plugin, by Mark Jaquith in order to enforce the non-use of www in my site. Now I notice that it is possible to call my site even using www. Is there a way to fix the problem and manage the redirection? In my WP Settings I set up my site without www.

  2. Rev. Voodoo
    Volunteer Moderator
    Posted 4 years ago #

    # Redirect www to non-www
    RewriteCond %{HTTP_HOST} ^www\.(.*)
    RewriteRule (.*) http://%1/$1 [R=301,L]

    before the #start wordpress part of your .htaccess

  3. editor
    Member
    Posted 4 years ago #

    I've added the rule, but unfortunately now I'm getting a URL exposing my wp-content directory, and the W3 Total Cache subdirectory...

  4. editor
    Member
    Posted 4 years ago #

    As I suspected, there was a problem with W3TC. I've found a fix here.

  5. Frederick Townes
    Member
    Posted 4 years ago #

    Ok.

Topic Closed

This topic has been closed to new replies.

About this Topic