Welcome to WebmasterWorld Guest from 50.19.0.90

Forum Moderators: Ocean10000 & incrediBILL & phranque

Message Too Old, No Replies

Large .HTACCESS - Will it cause problems?

     
7:33 pm on Mar 3, 2008 (gmt 0)

New User

5+ Year Member

joined:June 15, 2007
posts: 5
votes: 0


I am about to create an .htaccess file with more than 5,000 301 redirect. Will this cause any problems, slowness, or anything unusual?

Thanks in advance!

8:47 pm on Mar 3, 2008 (gmt 0)

Senior Member

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

joined:July 3, 2002
posts:18903
votes: 0


Surely you can use several simple rewriterule conditions to do this by pattern matching.
9:45 pm on Mar 3, 2008 (gmt 0)

Senior Member

WebmasterWorld Senior Member jdmorgan is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:Mar 31, 2002
posts:25430
votes: 0


I agree that pattern-based redirects as implemented by mod_rewrite or mod_alias' RedirectMatch can probably be used to greatly reduce the number of redirect directives needed.

However, to answer your question a bit more directly: The server performance impact of 5000 lines of code will depend on how many requests per second you get, how fast your server's CPU is, how much physical memory it has, and if it is shared, how many other sites it is shared with, and how busy they are.

If you're on a fast dedicated server with a lot of memory, you may not notice a performance problem until you reach several thousand requests per minute. If you are on heavily-shared hosting on a typical server, then you may have problems handling only one or two dozen requests per second...

Realize that every one of these redirect directives will be processed for each and every HTTP request to your server -- For every page, image, script, multimedia file, or stylesheet request. That is, unless you write the code to prevent this by making some of the code conditional (e.g. "skip this code except for .html page requests").

I would not recommend implementing 5000 redirects, either from a server-performance perspective, or from an SEO standpoint; You may destroy your site pages' ranking in search engines by making such a large change so suddenly.

Jim

 

Join The Conversation

Moderators and Top Contributors

Hot Threads This Week

Featured Threads

Free SEO Tools

Hire Expert Members