• Since moving my home page from /wordpress/ to the root folder so my blog appears at myURL.co.uk the old myURL.co.uk/wordpress/ url is not redirecting to the new home page. Instead it produces a 404 page not found error.

    I have hundreds of backlinks to myURL.co.uk/wordpress/ which are now broken and my traffic seems to have nose-dived – please help

    Andy

Viewing 2 replies - 1 through 2 (of 2 total)
  • @washerhelp

    It could be worth setting up a URL redirect using your .htaccess file.

    https://www.besthostratings.com/articles/htaccess-redirects.html

    ^JD

    Thread Starter Whitegoodshelp

    (@washerhelp)

    Many thanks James. I did try that before but it went badly wrong, I presumably got the syntax wrong. I just tried

    RedirectMatch permanent ^/wordpress/index.php$ https://www.whitegoodshelp.co.uk/ and it seems to have worked.

    What I don’t understand is why WordPress hasn’t done this for me? When I copied the index.php file over to the root and told wordpress the home page was in the root, then did the permalinks I don’t understand why wordpress didn’t write to the htaccess files this change instead of leaving all old links to my blog home page broken.

    According to the wordpress instructions for moving an index page from a sub folder to the root you should have .htaccess files in both places as well as index.php in both places (simply copy them across), but something seems to have gone wrong because WordPress should surely redirect requests for /wordpress/index.php to the new index.php in the root but it doesn’t. Instead it goes to my blog, with everything displaying ok but with a 404 page not found display.

    I had lots of problems including database errors until I deleted everything in the original /wordpress/.htaccess file and left it blank.

    Currently I have this in my root folder –

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

    # END WordPress

    but in the old /wordpress/ folder the .htaccess is completely blank and wordpress has chosen not to write anything to it. Is this normal?

    Many thanks

    Andy

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Moved index page to root but old /wordpress/ url not redirecting’ is closed to new replies.