From  CertCities.com
Column

Enabling Compression for Individual Sites in IIS 6.0
How can I enable static compression on only one specific site?

by Zubair Alexander

3/4/2009 -- I'm running IIS 6.0 on Windows Server 2003. I can see the Service tab only on the Web Sites folder, not the individual Web sites, which means I can only enable static compression globally on all sites. How can I enable static compression on only one specific site?

Answer:
HTTP compression is enabled though the Service tab, which is only available on the Properties of the Web Sites folder (as you've discovered). You can compress either static or dynamic responses for your Web site, which speeds up Web site performance.

There are two options for you to select: "Compress application files" and "Compress static files." When you select the "Compress application files" option, you're configuring dynamic compression. When you select "Compress static files," you're configuring static compression.

Besides using the GUI, you can also enable static or dynamic compression by using the adsutil.vbs script. For static compression, use the following command at the command prompt:

cscript adsutil.vbs set w3svc/filters/compression/parameters/HcDoStaticCompression true

Replace the word "Static" in the above command with "Dynamic" for dynamic compression:

cscript adsutil.vbs set w3svc/filters/compression/parameters/HcDoDynamicCompression true

In your case, you're interested in enabling static compression for only one specific site, so you can first disable compression for all sites using the advsutil.vbs script. Then you can enable compression for just one site.

Log on as an Administrator account and type the following at the command prompt to disable static compression globally:

adsutil set w3svc/filters/compression/parameters/HcDoStaticCompression false

Now enable static compression only for your site by typing the following:

adsutil set w3svc/1/root/Home/mySite/DoStaticCompression true

Replace the path to mySite in the above command with the name of your site.


Zubair Alexander, MCSE, MCT, MCSA and Microsoft MVP is the founder of SeattlePro Enterprises, an IT training and consulting business. His experience covers a wide range of spectrum: trainer, consultant, systems administrator, security architect, network engineer, author, technical editor, college instructor and public speaker. Zubair holds more than 25 technical certifications and Bachelor of Science degrees in Aeronautics & Astronautics Engineering, Mathematics and Computer Information Systems. His Web site, www.techgalaxy.net, is dedicated to technical resources for IT professionals. Zubair may be reached at .

 

 

top

Copyright 2000-2009, 101communications LLC. See our Privacy Policy.
For more information, e-mail .