Come thrive with the Hiiv | beehiiv Community Icon

Help Needed: Redirects for Migrated WordPress to Beehiiv Site

·
·

I've migrated my site from WordPress to Beehiiv and updated the DNS to point to Beehiiv. The old site is still accessible at its previous URL that Cloudways hosting gives. However, all my previously published posts are returning 404 errors because Beehiiv adds a /p/ prefix to the URLs. In my old Wordpress site it was just blog.com/blog-post I've attempted to add the necessary rewrite rules to the .htaccess file on the old site, but the redirects aren't functioning as expected. Could someone assist me in ensuring that the .htaccess file is correctly configured and that the server is properly handling these redirects? Additionally, should I remove the old posts to prevent potential duplicate content issues, or is there a better approach to handle this situation?

  • Avatar of Joël C.
    Joël C.
    ·
    ·

    Might need to open a ticket for this unless a magician appears in the chat

  • Avatar of Mario P.
    Mario P.
    ·
    ·

    there are different question marks on how is the redirect being handled and at what stage, whether .htaccess is in use (I don't remember if Cloudways is supporting this actively as we're using nginx there), whether you have Cloudflare as well, etc. Other than that, as a baseline, something like that should work:

    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.+)$ /p/$1 [R=301,L]

    if that's what you're trying, I'd look into Cloudflare rules where you can add a permanent redirect to /p/$1 for all old links