[ad_1]
[ad_2]
I am in the process of converting a wordpress site to a static site. The conversion is fairly straight forward but I cannot figure how to keep the same links. At the moment the wordpress page urls are in the form www.website.com/article-title.
The converted site is www.website/article-title.html or www.website/article-title/index.html depending if I use a separate folder for each page.

Install the “Redirection” plugin and set up rules:
1. `^/(.*).html` > `/$1`
2. `^/(.*)/index.html` > `/$1`
Untested, but let me know if there any issues.
In your static site, first you have to create a directory named as article-title. Then you have to put an index.html file inside that folder. The HTML code to be in that index.html file.
Depending on how you host the “static” site, you might still have options for basic rewrites, like tacking on a `.html`.
Most services that are designed to host static sites will automatically
* redirect from `/article-title` to `/article-title/`
* serve requests for `/article-title/` by returning the file `article-title/index.html`
So there’s a good chance that your second variant, or even both variants, Just Work.
But again: this depends 100% on how you serve the static files, and has nothing to do with WP.
.htaccess for apache. Nginx.conf for nginx. Ask copilot for the solution. It’s very simple.
Have you tried using a plugin (e.g. https://wordpress.org/plugins/simply-static/) to do the conversion? If I remember correctly, everything is set up to work automatically that way. But as others pointed out: otherwise you just need the correct htaccess rules depending on your file and folder structure.