• My blog will not load (the dashboard is OK, however.)
    Firefox says:
    > The page isn’t redirecting properly
    > Firefox has detected that the server is redirecting the request for this address in a way that will never complete.

    (IE is similar).
    The problem is resolved if I edit out one line in my overall root htaccess.
    The WP htaccess in /blog reads:
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

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

    # END WordPress
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    That overall root htaccess reads:
    ~~~~~~~~~~~~~~~~~~~~~~~~~
    # redirect non-WWW to WWW
    RewriteEngine on
    RewriteCond %{HTTP_HOST} ^themagicofyou\.co\.uk$ [NC]
    RewriteRule ^(.*)$ https://www.themagicofyou.co.uk/$1 [R=301,L]

    # steers 301s to the index page
    redirectMatch 301 ^(.*)/$ https://www.themagicofyou.co.uk$1/index.php

    (Plus there are dozens of explicit “redirect permanents”.)
    ~~~~~~~~~~~~~~~~~~~~~~~~~~
    The line which causes the problem is this one:
    # steers 301s to the index page
    redirectMatch 301 ^(.*)/$ https://www.themagicofyou.co.uk$1/index.php

    If I comment this out, the blog loads fine. I have 301’s coming in from an old site, so I do need to steer 301s to the index page.

    How do I make the htaccesses play nicely together?

    Many thanks

    Andy

Viewing 2 replies - 1 through 2 (of 2 total)
  • You need to make the root htaccess ignore urls that point to your blog. Because of htaccess inheritance, your blog pages are being redirected to your index.

    Thread Starter Andy3142

    (@andy3142)

    That’s good – can you tell me how to do that?
    Many thanks
    Andy

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘htaccess goes round in circles and so do I’ is closed to new replies.