Forums

[resolved] Preventing htaccess redirecting to blog from root (2 posts)

  1. hxcaine
    Member
    Posted 6 months ago #

    Hi,

    My blog is hosted at example.com/blog and I used to want all traffic to go to the blog because I had nothing else on the site. I.e. example.com would go to example.com/blog

    However, I now have a homepage at http://www.example.com. I can access this page when I go to "www.example.com" in the browser URL bar, but if I use "example.com" without the www I get redirected to "example.com/blog", which I don't want.

    My root .htaccess file looks like this:

    redirect 301 /contact http://example.com/contact.html
    redirect 301 /home http://example.com/index.html

    And my /blog/.htaccess file looks like 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

    Does anybody know how I can prevent this redirection?

  2. hxcaine
    Member
    Posted 6 months ago #

    The problem seems to have gone away since accessing the site from work. Perhaps there was some strange caching issue on my home computer, or something needed to propagate.

    I shall come back if the issue arises again.

    Have a good day :)

Reply

You must log in to post.

About this Topic