Support » Fixing WordPress » pages broken after htaccess 301 change

  • Resolved themightyant


    I have just moved a website from a subdirectory to the root of the domain for launch by moving and updating the index.php file.

    This worked fine until I added an htaccess file to the root to redirect old html pages to the top-level URL (I have restored the old index.htm for the time being)

    The home page came up fine but any second level links eg: now display a ‘Not Found – The requested URL /for-every-occasion was not found on this server.’ message.

    I removed the htaccess file as soon as I noticed the problem but the problem persists

    The htaccess file contained the following

    redirect 301 /bespoke.htm
    redirect 301 /collections.htm
    redirect 301 /contact.htm

    I can rename the index.htm file to prioritise wordpress if necessary for you to recreate the problem.

    I usually like to figure it out myself and find answers on this forum but this is the first time I have not found a similar case.

    Any help would be greatly appreciated.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Hi I have fixed this.
    If anyone else has a similar problem it is because WordPress already writes to an htaccess file to make pretty permalinks. As such writing my own htaccess file overrided the wordpress permalinks.

    To fix, in the wordpress backed just go to Options -> Permalinks and update the permalink structure, it should rewrite the htaccess file.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘pages broken after htaccess 301 change’ is closed to new replies.