IIS 7.5 Express 多重網站

IIS 7.5 Express 支援多重網站嗎? 官方是不支援這樣的設定的。

微軟出的 IIS 7.5 Express 可以讓舊電腦(XP)安裝最新的IIS版本。想把 XP 內建的 IIS 換成 IIS Express 要有些心理準備。它沒有完整的 GUI 設定介面,所有設定都要用文字編輯器修改設定檔。啟動或停止網站服務也都要用命令列指令來完成。不過裝了它可以讓 XP 擁有如同伺服器最新 IIS 版本的所有功能。

還有個缺點,一次只能只能啟動一個網站,即使設了多個也是只能選其中一個來啟動。畢竟它是設計來當開發用的測試環境。還好 IIS Express 內建 URL Rewrite 模組。有了 URL Rewrite 透過一些小技巧就可以把不同目錄模疑成支援多網站的IIS了。

假設有兩個網域 www.aaa.com 及 www.bbb.com 的 IP 都指到這台電腦。如果想讓

  • 連到 http://www.aaa.com/ 連到網站根目錄下的 /www.aaa.com/
  • 連到 http://www.bbb.com/ 連到網站根目錄下的  /www.bbb.com/

可以透過修改網站 web.config 檔 (沒有的話自行建立放置於網站根目錄)
加入 URL Rewrite 的設定如下:

<?xml version="1.0" encoding="UTF-8"?>
                <rewriteMap name="site1" />
                <rule name="CanonicalHostNameRule1" stopProcessing="true">
                    <match url=".*" />
                    <conditions logicalGrouping="MatchAll">
                        <add input="{HTTP_HOST}" pattern="^(.+)$" />
                    <action type="Rewrite" url="{C:1}/{R:0}" />


有關 IIS Express 的安裝使用就請客位看官請自行 Google 一下吧!

13 個回應:

Fangyaya 提到...

michael kors handbags
louis vuitton outlet
toms shoes
coach factory outlet online
beats headphones
lebron james shoes
nike air force
coach outlet online
coach outlet
kate spade handbags
michael kors handbags
polo ralph lauren
michael kors outlet clearance
true religion
basketball shoes
christian louboutin shoes
louis vuitton bags
ray ban sunglasses outlet
toms shoes
kate spade outlet
cartier watches
polo ralph lauren
jeremy scott shoes
michael kors handbags
timberland outlet
kate spade handbags
ray ban sunglasses
oakley sunglasses wholesale
jordan 6
oakley sunglasses
instyler curling iron
jordan concords
lebron james shoes 13
adidas nmd
kate spade

chenmeinv0 提到...

north face jackets
moncler coats
fitflop shoes
ugg outlet
ray ban outlet
canada goose sale
nike tn pas cher
michael kors outlet
oakley sunglasses outlet
pandora jewelry

chenlina 提到...

gucci outlet
oakley sunglasses
michael kors outlet
longchamp pas cher
oakley sunglasses outlet
adidas yeezy 350
louis vuitton
michael kors outlet
beats by dre
mont blanc mountain pen

Unknown 提到...

coach outlet
tiffany outlet
canada goose outlet
michael kors outlet
ed hardy
air jordan retro
yeezy boost
longchamp uk
cheap oakley sunglasses

Unknown 提到...

Heavy kitchen appliances anD pACkeD warDroBe Boxes shoulD Be loaDeD onto the truck last, secureD well for sAFe transportation anD unloaDeD first when the vehicle reAChes its Destination. - شركة نقل عفش بالرياض رخيصة - افضل شركة شراء اثاث مستعمل بالرياض
Disengage the loaDing ramp, close the BACk of the rental truck securely anD Drive sAFely.

SAFety shoulD Be your top priority when loaDing your renteD moving vehicle. Try to always think a few steps aheaD so that your householD gooDs continue to serve you in the same conDition that they left your olD home. افضل شركة نقل اثاث بالمدينة المنورة
تخزين اثاث بالرياض
شركة نقل عفش بجدة
شركة نقل اثاث بينبع

steve 提到...

معلومات مفيدة جدا شكرا لك يمكنك زيارة :

شركة نقل عفش من جدة الى الامارات
شركة نقل عفش من جدة الى الاردن
شركة نقل عفش من جدة الى الدمام
شركة نقل عفش من جدة الى المدينة المنورة
شركة نقل عفش من جدة الى الطائف
شركة نقل عفش من جدة الى البحرين

cara menggugurkan hamil 提到...

just information we only provide information for those who need it

cara menggugurkan kandungan 提到...

I thank you for the information and articles you provided
# cara berhubungan intim buat ibu hamil
# buah yang bagus untuk ibu hamil
# makanan dan minuman ibu hamil
# senam ibu hamil
# sistim reproduksi wanita
# cara memperlancar menstruasi
# ciri ciri pubertas pada perempuan
# siklus menstruasi
# anatomi reproduksi wanita

Majortotosite Pro 提到...

Excellent goods from you, man. I have understand your stuff previous to and you are just extremely excellent. 토토사이트

Racesite Pro 提到...

I am aware that people like you, are naturally intuitive, resourceful and already have the ability to heal yourself and transform into the person you want to be, you just need assistance to tap into your own resources. 경마

Oncasinosite Net 提到...

I think it should be a good opportunity to get feedback from others who are experienced. 바카라사이트

Totopick Pro 提到...

I will pass this blog to many people. Definitely a good blog is very good. Thank you for sharing. 메이저사이트

24rpx5fs5o 提到...

This saves plenty of time, and the improved accuracy may help eliminate waste, since there are less faulty parts that have to be thrown away. Means Engineering provides contract manufacturing companies to individuals, small companies, start-ups, authorities businesses, and huge firms. Our 5-axis CNC machine permits us Cat Toys to create advanced parts for a variety of|quite a lot of|a wide range of} purposes. Please contact us for more details about our CNC machining capabilities.