Among my clients (before I arrived) made the decision to make use of htaccess redirects his or her type of URL shortening/internet search engine friendly Web addresses. They've literally 1000's of these.

The brand new version from the site presently has friendly web addresses however they aren't equal to their redirects so that they still need them.

My question for you all is: Can there be one other way rather than populate this file with 1000's of lines of "Redirects /folder1 /folder2"?


If you fail to make simple rules to trap these as with the @chris henry solution you should use the RewriteMap utility of mod_rewrite. You'll have the ability to write these 1000 rules inside a text file, make this text file an hash file, and mode_rewrite will attempt to complement url within this file (whether it's an hash file the correct answer is fast). Next mode_rewwrite can produce a redirect 301 using the [L,R=301] tag.

Yep, take a look at while using Apache config (httpd.conf or httpd-vhosts.conf) to setup site wide folder aliasing. Eg:

Alias /folder1 c:/www/folder2

Take a look at for more information.

For the way different the Web addresses being rerouted are, one solution may be to develop an rewrite rule that covers these, and keep rapid / lengthy Web addresses inside your application, or perhaps a database.