WordPress.org

Ready to get started?Download WordPress

Forums

Tried to remove www, now ***.net/blog redirects to ***.net (1 post)

  1. Kreachure
    Member
    Posted 2 years ago #

    Hello, I installed WordPress at example.net/blog. I wanted to remove the www with the .htaccess file, so I changed this:

    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /blog/
    RewriteRule ^index\.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /blog/index.php [L]
    </IfModule>
    # END WordPress

    to this:

    RewriteEngine On
    RewriteBase /
    RewriteCond %{HTTP_HOST} ^www.example.net$ [NC]
    RewriteRule ^(.*)$ http://example.net/$1 [R=301,L]
    
    RewriteCond %{REQUEST_URI} ^/?.* [NC]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]

    As per the instructions on the exact same problem here. Now trying to go to example.net/blog (or http://www.example.net/blog) redirects to example.net (which is a parked site). I changed the htaccess code back to what it was originally, but it is still doing it.

    What should I put in the htaccess file to regain access to /blog (but still keeping the no-www)? Thanks in advance.

Topic Closed

This topic has been closed to new replies.

About this Topic