Wordrpess site redirection

Hello, I have a Wordpress site deployed on Netlify via W2P static plugin and I am trying to figure out how to set up some 301 redirections.

I found in your documentation that I need to create a redirect file and upload it to the root folder on Netlify, but I cant figure out how to do it as my site is being deployed automatically with the plugin.

Thank you for any help and have a nice day
Pavel

Hi @janik thanks for the post.

The current solution will depend on your deployment method:

  • for Netlify, using our Add-on, we provide a field for entering your redirects
  • for Netlify manual, you’ll need to download and extract the ZIP, add in a Netlify _redirects file, zip it up again and deploy

The quoted text above is from the WP2Static official documentation. There is a field in the WP2Static settings page in the WordPress dashboard where you can enter your redirects that’s if you are using the automatic deployment method.

Kindly check the WP2Static official documentation link below for more information.
https://wp2static.com/support/how-will-our-wordpress-redirects-work

Also for more information on configuring WP2Static with Netlify, kindly visit the link below.
https://wp2static.com/addons/netlify

Let me know the outcome after you follow the instructions in the WP2Static official documentation.
Thanks.

Hello, thank you for your answer.

I read the documentation but I still cant find the field for entering redirects in their addon.

I also tried to download ZIPed files of my wordpress, add _redirects file insite that zip and upload the website manually, but it the redirect is still not working.

Can I somehow check what files are inside my depository, so I can see if the _redirects file was uploaded?

Than you and have a nice day!
Pavel

Hi @janik thanks for the feedback.
At this point it would be appropriate to seek help from WP2Static.
Kindly visit the support forum of WP2Static in the link below.

You can also create an issue on the Official WP2Static GitHub page at Issues · WP2Static/wp2static · GitHub

Let me know how it goes after you get help from their support.

Thanks.

Thanks for sharing those resources, @clarnx :raised_hands: Let us know how it goes, @janik :smile:

1 Like

Hello, while I am waiting for the W2P forum to verify me I uploaded my Wordpress to GitHub to try adding a _redirect file in the root folder and setup my redirections but I cant make them work.

I need to redirect every /index.html to / (because google sees all pages as duplicates now).

My _redirect file looks like this: Screenshot by Lightshot

The redirect from /index.php is working, but redirect from index.html is not working at all.

Thank you for any tips and help.
Pavel

Hello @janik, there is a similar post on this forum about removing index.html extension from your URL and @fool’s answer in the link below summarizes how redirects work with regards to file extensions.

However you can enable pretty URL’s even thought Netlify will still serve both, with or without the feature enabled.
Checkout how to enable pretty URL’s in the link below.
Redirect options | Netlify Docs.

Thanks.