Forum Moderators: phranque

Message Too Old, No Replies

Maximum size of the htaccess file?

         

turbohost

11:18 am on Dec 9, 2004 (gmt 0)

10+ Year Member



Hi Guys,

I've got to add a lot of 301 redirects to my htaccess file. Is there a limit in size of the htaccess file? I've got to add about 200,000 redirects and it seems that changing the htaccess file is my only option :->

Turbo

jdMorgan

5:08 pm on Dec 9, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



turbohost,

The main issue wil be performance, not size. Possible solutions:

  • Take advantage of any "patterns" in the redirects to use one directive to accomplish multiple redirects.
  • Put some redirects in subdirectory .htaccess files if possible, to limit their execution scope.

    See RedirectMatch in Apache mod_alias, and RewriteRule in mod_rewrite for examples of how to use regular expressions and back-references to accomplish multiple redirects with one directive.

    200,000 redirects? Sheesh! :o

    Jim

  •