[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 238
  • Last Modified:

How to modify webconfig file in WebServer 2008

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
eanmd
Asked:
eanmd
1 Solution
 
Dave BaldwinFixer of ProblemsCommented:
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
 
David Johnson, CD, MVPOwnerCommented:
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

Problems using Powershell and Active Directory?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

Tackle projects and never again get stuck behind a technical roadblock.
Join Now