• Resolved themightyant

    (@themightyant)


    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: https://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 https://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 https://example.com

    Or is there another way?

    Any help would be greatly appreciated

Viewing 4 replies - 1 through 4 (of 4 total)
  • Since it’s an htm file…

    <html>
    <head>
    <meta http-equiv="refresh" content="2;url=https://example.com" />
    </head>
    <body>
    You will be redirected in 2 seconds.
    </body>
    </html>

    Thread Starter themightyant

    (@themightyant)

    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:
    https://www.redalkemi.com/blog/the-seo-war-of-redirects-301-vs-302-vs-meta-refresh-tag

    Thoughts?

    Thread Starter themightyant

    (@themightyant)

    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?

    Thread Starter themightyant

    (@themightyant)

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

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘301 redirects with wordpress in subdirectory’ is closed to new replies.