Advice On Generating Mass 301 Redirects

I am migrating my old school static html site to CS-Cart 4.2 :)

My old site is completely static and basically a collection of thousands of html files with no online backend system attached to it.

My ranking in Google is top notch and I want to preserve this by correctly 301 redirecting all urls to the CS-Cart locations.

But the question is how?

Does anyone have advise on how to generate a list of old urls and add 301 redirects for each url?

How to generate a list of old urls?

Is it best to add redirects to the .htaccess file or the CS-Cart 301 redirect manager?

Is there a way to catch any urls that result in a 404?


Can you not just make sure they have the original SEO name? Assuming you will be using same www.***.


The old urls are very different than CS-Cart url's. Not only in syntax, but also in site set-up. The old site has different pages for every product option, while in CS-Cart customers can buy everything form the same page.

I gather that I will need to use a sitemap generator tool / spider or something.


If you can sort say A to Z and export, then import to CS the SEO (URLS) that might work for you!


how about downloading “copyfilenames” , then have the old site local on a windows machine to copy all the filenames.

Paste them into excel then do a find replace for the www.oldsite/ and replace with www.newsite. Same with all the different product option names but point each corresponding one to the new 1 single page on cs.

Then do a redirect on old server for www.oldsite to www.newsite,


If I download all files to a windows machine, then that will include both html and non-html files. I only need the urls of the html files. Not the non-html files. It doesnt seem like I can ignore non-html files with the program copyfilenames.

The domain name will stay the same. There are tens of thousands of html files in many folders. Is there a script which I can use on the IIS server to create a text file of the html files?

Once I have a text file with all original urls I can paste that into Excel and manually put the target url's in the 2nd column.

From there, I can generate the .htaccess code in this way:

This way I will put it straight into the .htaccess which is probably better in terms of performance.

So the main question seems to be: what script can I use to create a complete list of old urls?

download all files, paste into excel, filter column by .html files only…copy paste the filtered files to another worksheet, then all you have is .html files


This is a good tool i have used when i have many redirects:

I figured it out. Maybe its of use to anyone else.

I downloaded all files to my pc. Installed copyfilenames: CopyFilenames - a free Windows File Explorer extension

Then copied all file names per directory and pasted it into this: http://textmechanic…ix-to-Text.html

There I added the missing part of the url.

Then I downloaded the 301 redirect generator: https://websiteadvan…irect-Generator

I added the old urls in there.

From there it's a matter of going through each old url and finding the new url on the new site and entering that into the new URL column. Still a lot of work, but at least its possible.