Welcome to WebmasterWorld Guest from

Forum Moderators: goodroi

Message Too Old, No Replies

Automatic 301 redirect generator for htaccess?

site directory changes - many files need moving



12:35 am on Feb 2, 2009 (gmt 0)

5+ Year Member

I need to re-organise the directory structure of part of my website. This means changing the URLs of many HTML and image files.

Is there such a thing as an automatic 301 redirect generator that I can use for the .htaccess file?

i.e. this 'generator' would take a snapshot _before_ the changes and another _after_ the changes and then automatically generate a list of 301 redirects to paste into the .htaccess file.

If so it would save a large amount of work in manually entering each 301 redirect statement, and the errors naturally associated with doing it manually.

I am using Dreamweaver on a Windows XP system. The website concerned is: www.astrocruise.com

Many thanks


1:10 am on Feb 2, 2009 (gmt 0)

WebmasterWorld Senior Member g1smd is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

In most cases, there's no need for one rule per URL.

If the URL structure has been properly designed, then a small number of patterns can be used, each matching hundreds or even thousands of URLs and programatically redirecting to the correct new format.

If that's not an option, then use a redirect script that captures all of the requests for old URLs, looks up the new URL in a table, or database, and then issues the appropriate redirect HEADER data back to the browser.


3:36 pm on Feb 2, 2009 (gmt 0)

5+ Year Member

Many thanks for your help. I am semi-competent with Dreamweaver but I am not up to writing scripts, unfortunately. All I really need is a 'before' and 'after' sitemap with differences shown, preferably also with 301 redirects inserted. Dreamweaver may be able to do this (maybe I should ask on that forum) by saving the current sitemap, saving the new (modified) sitemap and comparing the two files to show differences. All the differences would need editing but at least it should be better than doing the whole thing manually. I may be able to do the same thing with the XML sitemap generator. But I feel sure there must be a utility somewhere to automatically generate the 301 redirects.

Many thanks


Featured Threads

Hot Threads This Week

Hot Threads This Month