301 redirects in .htaccess (3 posts)

  1. cdragin
    Posted 3 years ago #

    I have recently migrated a site that was built in Dreamweaver to a WordPress site. I am trying to get the redirects to work and not sure why they are not.

    I have wordpress in its own directory, which means there are two .htaccess files: one at the root and one within the wordpress folder. I am editing the .htaccess that is in the wordpress folder.

    I have the redirects at the bottom of the file, after # END WordPress.

    The first one works fine:
    redirect 301 /index.html http://website.com/

    I can't get any others to work, though, they are in this format:
    redirect 301 /website_Sections/Section_name/file.html http://website.com/new-file.html

    Currently, all the redirects in this format go straight to the old page; they don't redirect to the new page.

  2. cdragin
    Posted 3 years ago #

    Correction on the format (no .html on the new file):
    redirect 301 /website_Sections/Section_name/file.html http://website.com/new-file

  3. cdragin
    Posted 3 years ago #

    Figured it out...the first one, for the index.html file, needed to be in the .htaccess file in the wordpress folder. The others need to be in the .htaccess file in the root folder.

Topic Closed

This topic has been closed to new replies.

About this Topic