Results 1 to 2 of 2

Thread: Tried to remove www, now ***.net/blog redirects to ***.net

  1. #1
    Join Date
    Mar 2012
    Posts
    3

    Default Tried to remove www, now ***.net/blog redirects to ***.net

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

    Code:
    # 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:

    Code:
    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 (parked). I changed the htaccess code back to what it was originally, but it is still doing it. Even with an empty htaccess, it keeps doing it!

    What should I put in the htaccess file to regain access to /blog (but still keeping the no-www)? Thanks in advance.
    Last edited by Bob Barr; 03-08-2012 at 01:37 PM. Reason: Live link disabled

  2. #2
    Join Date
    Aug 2012
    Posts
    1

    Default

    Well, example.net needs to be changed to your actual domain name. But when I do this, in my wordpress site it does in fact get rid of the www, but then fails to load due to too many redirects. I'm not sure if this has to do with the fact that my domain is hosted elsewhere and I need different or additional code. Has anyone solved this?

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •