7

मैं कोशिश की है:आईआईएस 7 यूआरएल रिवाइट मॉड्यूल का उपयोग कर एप्लिकेशन रूट पर रीडायरेक्ट कैसे करें?

1) मैं पहली बार खाली स्ट्रिंग की कोशिश की:

<action type="Redirect" url="" redirectType="Permanent" appendQueryString="false" /> 

परिणाम:

<action type="Redirect" redirectType="Permanent" appendQueryString="false" /> 
:

HTTP 500.52 - URL Rewrite Module Error. 
The substitution URL for the current action cannot be empty. 

2) शायद मैं url विशेषता छोड़ देना चाहिए

वही परिणाम:

HTTP 500.52 - URL Rewrite Module Error. 
The substitution URL for the current action cannot be empty. 

3) क्या ASP.NET तरीके के बारे में:

<action type="Redirect" url="~" redirectType="Permanent" appendQueryString="false" /> 

प्रयास {APP_ROOT}/~ पर रीडायरेक्ट करने।

4) अंतिम कोशिश:

<action type="Redirect" url="/" redirectType="Permanent" appendQueryString="false" /> 

जैसी उम्मीद थी, यह सर्वर के रूट पर रीडायरेक्ट ...

मैं कुछ साफ सामान्य समाधान खोजने के लिए चाहते हैं। (। मैं कुछ ठोस /myCurrentAppPath उपयोग नहीं कर सकते)

उत्तर

5

यह बेहतर काम करता है:

<action type="Redirect" url="." redirectType="Permanent" appendQueryString="false" /> 
+0

+1 ठीक है। धन्यवाद। –

2

अभी के लिए यह कोशिश है, यह साफ नहीं है, लेकिन यह काम करता है:

<action type="Redirect" url="?" redirectType="Permanent" appendQueryString="false" /> 
+0

धन्यवाद! अगर आपको बेहतर समाधान मिल जाए तो मुझे बताएं :) –

संबंधित मुद्दे