我的主機只支持web.config IIS配置。我想重定向我從應用程序(在根域級別)重定向到子應用程序
http://domain - >http://domain/X
,這裏是我的嘗試
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<httpRedirect enabled="true" destination="http://domain/X/" />
</system.webServer>
</configuration>
它的工作原理,但它適用於所有網站的麻煩,當我已經在http://domain/X/它仍然工作,所以我越來越遞歸http://domain/X/X/X/X/X/X/X等等
臨時解決方法是把
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<httpRedirect enabled="false" />
</system.webServer>
</configuration>
到http://domain/X和http://domain/Y等...但是當我去到http://domain/Y/Z它重定向反正我http://domain/X/Z/(所以地獄我真的不希望把這個任意文件夾中)
所以我想我需要修復第一次重定向(不知何故),使其僅適用於http://domain/
謝謝。
我加childOnly =「真」,但結果還是一樣:HTTP :// domain/Y/Z它反正將我重定向到http:// domain/X/Z/- 這對我來說是錯誤的,我只想要域/重定向到domain/X並且能夠與domain/Y一起工作。 – Cynede 2011-06-16 10:12:58