homepage Welcome to WebmasterWorld Guest from 54.166.39.179
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Home / Forums Index / Code, Content, and Presentation / Apache Web Server
Forum Library, Charter, Moderators: Ocean10000 & incrediBILL & phranque

Apache Web Server Forum

    
Large Number Of 301 Redirects
301 Redirect
wiseapple

5+ Year Member



 
Msg#: 3143717 posted 3:44 pm on Nov 2, 2006 (gmt 0)

Looking for a bit of help on how to handle a large number of 301 redirects. I have heard that if you put to many in the .htaccess file, that this can slow down your server. Does anyone have an idea of how many you can put? And what is the impact?

Also, if it cannot be handled purely through the .htaccess, are there scripts to handle this? I am moving a bunch of static html stuff. Prefer something that work in the perl realm. Do not currently have php installed on server.

Thanks for the help and ideas.

 

jdMorgan

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



 
Msg#: 3143717 posted 7:17 pm on Nov 2, 2006 (gmt 0)

Too many redirects, regardless of how they're implemented, can cause performance problems. The impact would depend on how many redirects you have, the CPU/memory/disk performance of your server, and the number of HTTP requests you receive per unit time. The only way to tell is to test.

The performance can also be affected by whether the code is placed into a server config file such as httpd.conf or conf.d where it is compiled into 'native code' on server restart and executed directly for each HTTP request, or placed into per-directory .htaccess files, where the directives are interpreted for each request -- The technical terms "compiled" versus "interpreted" being the main difference highlighted here.

In addition, the directives can be scoped in httpd.conf/conf.d using <Directory> or <Location> containers, or in .htaccess where you can put the code into .htaccess files in specific subdirectories where it will execute only for requests for URLs that resolve to the subdirectory in which it resides. This scoping approach can make a big performance difference, but at the cost of more complex maintenance.

Finally, since you'll lose all PageRank/Link popularity currently enjoyed by your old URLs, I have to add that unless you have a very good reason to change them, you shouldn't. You can simply map the old URLs to new files in any way you like. Changing URLs is usually unnecessary and should not be done lightly or merely for convenience, as pointed out by one the inventors of the Web, Tim Berners-Lee, in his paper, Cool URIs don't change [w3.org] -- A very worthwhile read.

Although you may have a compelling reason to change your URLs one last time, you can use this opportunity to design a core URL-structure that will never need to change again.

Jim

wiseapple

5+ Year Member



 
Msg#: 3143717 posted 5:33 pm on Nov 3, 2006 (gmt 0)

Jim,
Thanks for the reply. The reason I was looking to move some pages around was because of our site structure. Wanted to organize a bit better. However, after thinking for a bit more, it might be better to leave things in place and try other options.

Thanks.

wilderness

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



 
Msg#: 3143717 posted 5:44 pm on Nov 3, 2006 (gmt 0)

wiseapple,
I stumbled across an interesting read on site reorganization recently:

[w3.org...]

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / Apache Web Server
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved