Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

How to modify webconfig file in WebServer 2008

Posted on 2015-01-17
2
Medium Priority
?
227 Views
Last Modified: 2015-01-18
I am new to the server side modification in server 2008;  I want to define a global charset and do other modifications to webpage response header.  I am not sure exactly how to modify the webconfig file.  I would like to add the following to the webconfig file too:

here is the .htaccess version

AddDefaultCharset utf-8
<IfModule mod_expires.c>
# Enable expirations
ExpiresActive On
# Default directive
ExpiresDefault "access plus 1 month"
# My favicon
ExpiresByType image/x-icon "access plus 1 year"
# Images
ExpiresByType image/gif "access plus 1 month"
ExpiresByType image/png "access plus 1 month"
ExpiresByType image/jpg "access plus 1 month"
ExpiresByType image/jpeg "access plus 1 month"
# CSS
ExpiresByType text/css "access 1 month"
# Javascript
ExpiresByType application/javascript "access plus 1 year"
</IfModule>

How can I get this into the webconfig file for web-server 2008

Thanks for your help
0
Comment
Question by:eanmd
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 84

Accepted Solution

by:
Dave Baldwin earned 2000 total points
ID: 40555838
You need to be careful about doing that.  Make a backup copy of your web.config file.    ".htaccess" is for Apache and not IIS.  This page http://www.iis.net/learn/extensions/url-rewrite-module/importing-apache-modrewrite-rules tells how to Import Apache mod_rewrite Rules.
0
 
LVL 83

Expert Comment

by:David Johnson, CD, MVP
ID: 40555872
Expires by equivalent http://technet.microsoft.com/en-us/library/cc770661%28v=ws.10%29.aspx
favicon.ico place it in the root folder of the website
default encoding
<system.webServer>
		<staticContent>
			<remove fileExtension=".html" />
			<mimeMap fileExtension=".html" mimeType="text/html; charset=UTF-8" />
		</staticContent>
	</system.webServer>

Open in new window

0

Featured Post

Tech or Treat! - Giveaway

Submit an article about your scariest tech experience—and the solution—and you’ll be automatically entered to win one of 4 fantastic tech gadgets.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I was prompted to write this article after the recent World-Wide Ransomware outbreak. For years now, System Administrators around the world have used the excuse of "Waiting a Bit" before applying Security Patch Updates. This type of reasoning to me …
This article provides a convenient collection of links to Microsoft provided Security Patches for operating systems that have reached their End of Life support cycle. Included operating systems covered by this article are Windows XP,  Windows Server…
This tutorial will show how to push an installation of Backup Exec to an additional server in both 2012 and 2014 versions of the software. Click on the Backup Exec button in the upper left corner. From here, select Installation and Licensing, then I…
This tutorial will walk an individual through locating and launching the BEUtility application to properly change the service account username and\or password in situation where it may be necessary or where the password has been inadvertently change…

610 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question