We are currently converting our FAQ pages (database driven) to static pages. What we did is used a software that gathers the pages from the live site and produce the HTML version of the pages. Since the filename of the pages were created using the title like what wordpress does (in title case), the html filename are now in title case.
So there are 3 stages that we will be doing in the pages.
STAGE 1 [AUTOMATED]:
Convert the filenames from title case to lower case letters e.g. from /faq/question/1/This-Is-A-
e.html to /faq/question/1/this-is-a-
STAGE 2 [MANUAL]:
Refile the pages manually to category folders
STAGE 3 [AUTOMATED]:
Create htaccess redirects in batch recursively for all pages ready to add in the htaccess file
e.g. RedirectMatch permanent ^/faq/question/1/This-Is-A
We want to automate stage 1 and 3. Here is our idea of what the software tools or scripts should do.
STAGE 1 AUTOMATION:
We can just run the software or script and it will go through all pages recursively through all folders and subfolders under the /faq/ folder and convert all filenames to lower case
STAGE 3 AUTOMATION:
We will be keeping the original copy of the /faq/ folder with the title case filenames. What the script or software will do is look at the original copy of the faq/ recursively through all folder and subfolders and then find the equivalent page that is in the refiled faq/ folder and the software or script will go through all pages and then when done it will create the list of redirects that can just be copied to an htaccess file.
RedirectMatch permanent ^/faq/question/1/This-Is-A
RedirectMatch permanent ^/faq/question/3/This-Is-A
RedirectMatch permanent ^/faq/question/8/This-Is-A
Anyone who has any idea on software tools or scripts that can do the automations above or who knows how to create the scripts that can automate what we want to do with the renaming and creation of redirects for our pages?