WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] 301 redirects with wordpress in subdirectory (5 posts)

  1. themightyant
    Member
    Posted 4 years ago #

    Hi,
    I have installed WordPress in a subdirectory of my domain but the entry page is still at that address

    What I need to do is redirect the old html website pages in the root directory eg: http://www.example.com/about.htm to the new site

    Usually I would add a 301 redirect to the root directory eg:
    redirect 301 /jewellery.htm http://example.com

    However this breaks the permalinks in wordpress.

    The WordPress htaccess file is in the subdirectory not the root. Is it possible to edit this document to affect files in the directory above it something like
    redirect 301 ../jewellery.htm http://example.com

    Or is there another way?

    Any help would be greatly appreciated

  2. alieneila
    Member
    Posted 4 years ago #

    Since it's an htm file...

    <html>
    <head>
    <meta http-equiv="refresh" content="2;url=http://example.com" />
    </head>
    <body>
    You will be redirected in 2 seconds.
    </body>
    </html>
  3. themightyant
    Member
    Posted 4 years ago #

    Hi Alieneila, thanks for the prompt response.
    I had considered this but have heard that some search engines don't like it for SEO purposes and consider that it may be spam thus affecting pagerank.
    I can't find the exact page with that on but an example is:
    http://www.redalkemi.com/blog/the-seo-war-of-redirects-301-vs-302-vs-meta-refresh-tag

    Thoughts?

  4. themightyant
    Member
    Posted 4 years ago #

    I have added META REFRESH to the pages temporarily but would still like to know if it is possible to change this through a 301 redirect located in an htaccess file in a subdirectory.

    Also does anyone know how META REFRESH affects SEO?

  5. themightyant
    Member
    Posted 4 years ago #

    Fixed. Moving the htaccess file to the root direcory allows normal 301 redirects and preserves the permalink structure

Topic Closed

This topic has been closed to new replies.

About this Topic