Forum Moderators: phranque
Is it possible/desirable to have 10,000 301 entries in my httpd.conf file? If not what would be a good number? In other words what is the limit on the httpd.conf file?
While there is likely no technical limit (short of filesize restrictions in your server's OS) to the number of redirects in a config file, I would never recommend going over a few hundred, since the server will have to process all of them for every incoming HTTP request -- or at least for every incoming HTTP request for objects with a .jog extension if you structure the code correctly (Use a <DirectoryMatch>, <LocationMatch>, or <FilesMatch> container around mod_alias redirects, or a "skip rule" around mod_rewrite redirects to prevent unneccessary processing of those image redirect directives).
If all of the links you care about are from inside your own site, I'd say change all of your on-site links, redirect only the "very important ones" which have inbound links from other sites, and forget the rest. If you have tons of inbound links from other sites and keeping those links working is important, then I'd say don't change the URLs. It's likely that your "best-fit" solution lies somewhere in the middle.
Jim
From your comments I think we have decided to leave our old pictures where they are and add all the new pictures with a different filename and size. All links on the site will go to the new pictures. Eventually the old pictures will die off in the SE's. To speed up the die off we could add 301's a hundred at a time in httpd.conf
We are mostly worried about Google images as we get a large number of hits from this.
Does this sound good to you?
Thanks
John
If it isn't clear, a 301 is not a one-time switch that tells the search engines "don't ever request this old URL again after you find this redirect." Instead, it is a pointer that must stay in place if you want the search engine to continue to use the new URL after following a link to the old URL. In other words, the URL replacement persists only as long as the redirect remains in place.
Putting the new images in a separate directory would be a good idea, because if the traffic analysis warrants it, you can then remove the entire old-image directory all at once in the future.
Since I don't know your market segment, what these images are, and what part they play in the promotion or popularity of your site, I can't really offer informed "business advice," so I should probably just stick to discussing the technical aspects of redirects here.
Jim
to have 10,000 301 entries in my httpd.conf
May be it's worth to take a look at the option using a RewriteMap, type dbm (that is more or less an "indexed binary text file" but it is faster than a text file lookup) might be preferable than using a lot of individual entires. The lookup results are cached as well.
We were planning on keeping the images up for a long time. Good advice about analyzing inbound links. (We see google mostly now)
We were also aware if another site has a link to us and we 301 it Google still uses the 301 to get to the new page from the other site. We still have 8 year old .shtml 301's in place! Thanks for reminding me!
We have all our old images in a different directory to our new ones. Whew!
Caterham.
I think the idea of cluttering up the httpd.conf etc with redirects is just too much maintenance for us to worry about. BUT if we change our minds I will certainly look into this idea. I think the best bet based on what Jim said is just to keep the old photos and introduce the new and pray that Google/etc eventually drops the old photos when it finds we do not have links to them.
I need a cron job to delete the old photos in 10 years. Ha Ha
Thanks for the help
John
We have