• Resolved webVerts

    (@webverts)


    I use this plugin to host my blog on CF pages. My current workflow is deploy as zip, download and upload it manually.

    Now when downloading as zip, the 404 page is downloaded as a folder root/404_folder/index.html. When uploading to CF pages, it checks to 404 pages on the root folder, if it is not found it considers the upload as a single file application. This causes non-existing links to be redirected to home page instead of the 404 page. This causes a lot of SEO issue as there are duplicate contents.

    Workaround for this issue, is before uploading move the 404page(folder/index.html) to root folder and rename it as 404.html

    IS there any way to do it automatically, without me having to do the workaround, or without using GitHub

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Team Staatic

    (@staatic)

    Hi @webverts.

    First of all, thanks for using Staatic! While there’s currently no built-in feature in the interface to change the 404 path, you can achieve this through a custom action hook.

    You can find a working example of such a script here: https://gist.github.com/staaticdotcom/c42db4699118b3c83518be431a340013. To use it, simply download the staatic_post_processor_cloudflare.php file and place it in your /wp-content/mu-plugins folder (you might need to create this folder if it doesn’t already exist). Once you’ve done that, on the next publication, the 404 page should be stored as 404.html.

    We’re also considering adding direct support for this feature from the interface in future updates, but for now, this should serve as a solid workaround.

    Let us know how it goes, and feel free to reach out if you have any questions or run into any issues!

    Thread Starter webVerts

    (@webverts)

    That works. Thank You.

    Plugin Author Team Staatic

    (@staatic)

    Thanks for letting us know it worked! If you have any more questions or need further help, feel free to start a new topic.

Viewing 3 replies - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.