2010年1月28日

[IIS 7] Setup HTTP Redirect in IIS 7

Say I have a website which’s url is http://test.com/myWeb. We want clients to access this site via http://myWeb.test.com. To accomplish this, we can setup HTTP redirect.

  • First say we create a new site [TestIISRedirectSites] with a virtual directioy [TestSite]

0

  • Selecct [TestIISRedirectSites] on the Connections panel, then click on [Bindings…] on the Actions panel, this brings out a [Site bidings] dialog box

image

  • Click on the [Edit] button to edit the site properties, give this site a validate host name here then click [OK].

image

  • Now close the dialog, double click on HTTP Redirect on the IIS tab

image

    • On the HTTP Redirect property panel, chekc the [Redirect requests to this destiontion] checkbox, and in the textbox bellow, type [http://test.com/TestSite]
    • Also, check redirect behavior checkboxs and give each request a status code, here I just put a 302(Found)

image

    • Apply these changes

Try browser this site via http://test.com:8080 , it will then be redirected to http://test.com:8080/TestSite

[SQL] Shrink Database transaction log file

Shrink Truncated Log file in SQL Server 2008

DBCC SHRINKFILE(LOG_NAME, 1)
DBCC SHRINKFILE(LOG_NAME, 1)

Blog Archive

About Me