Solved

How to modify webconfig file in WebServer 2008

Posted on 2015-01-17
2
196 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
2 Comments
 
LVL 83

Accepted Solution

by:
Dave Baldwin earned 500 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 80

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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Clone Hype V Machine with ISCSI SAn storge 3 37
Company website 6 30
Join with a SQL Server STUFF 5 38
Map IIS 7.5 Virtual Directory to Microsoft File Server Directory 4 25
A procedure for exporting installed hotfix details of remote computers using powershell
A safe way to clean winsxs folder from your windows server 2008 R2 editions
This tutorial will give a short introduction and overview of Backup Exec 2012 and how to navigate and perform basic functions. Click on the Backup Exec button in the upper left corner. From here, are global settings for the application such as conne…
To efficiently enable the rotation of USB drives for backups, storage pools need to be created. This way no matter which USB drive is installed, the backups will successfully write without any administrative intervention. Multiple USB devices need t…

821 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