Forum Moderators: phranque

Message Too Old, No Replies

Any Limits on Number of 301 Redirects

         

PaulPA

6:52 pm on Jan 29, 2006 (gmt 0)

10+ Year Member



Does apache limit the number of 301 redirects that can appear in .htaccess? I need to redirect about 150 or so files. Also, can I expect any significant effects on site loading speed with such a large number of redirects?

extras

7:32 pm on Jan 29, 2006 (gmt 0)

10+ Year Member



You may want to read this one and maybe other thrads.
[webmasterworld.com...]

If they share common patterns, often you can group them and boil down to much smaller number of RewriteRule (or RedirectMatch).

PaulPA

11:05 pm on Jan 29, 2006 (gmt 0)

10+ Year Member



Well I have to change something like this:

www.sitename.com/section/catgory/sub-category1/page_1.htm. Where multiple pages within the sub-category exists in the form of page_2, page_3, etc.

Need to change all with the same "sub-catgory1" to "sub-category2". Is there an easier way to do this then to redirect individual pages?

jdMorgan

1:37 am on Jan 30, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



PaulPA,

It is likely that you can accomplish what you need with just one or only a few directives. The fact that mod_rewrite uses regular-expressions pattern-matching allows it to 'find' commonalities such as your 'sub-category1' path-part, and apply a URL 'transform' to all URLs that contain that path-part.

For more information, see the documents cited in our forum charter [webmasterworld.com], in particular the "Apache Rewriting Guide", and the tutorials in the Apache forum section of the WebmasterWorld library [webmasterworld.com].

This introductory tutorial [webmasterworld.com] may also be useful to get started.

Jim