पर रीडायरेक्ट करता है मैं वेब ऐप के साथ एज़ूर क्लाउड का उपयोग करता हूं और nodejs
पर मेरा सर्वर पक्ष लिखा जाता है। जब वेब ऐप को http अनुरोध प्राप्त होता है तो मैं अनुरोध को https पर रीडायरेक्ट करना चाहता हूं, मुझे समाधान मिला। मैं डाल कि rules
टैगAzure वेब ऐप http को https
<rule name="Force HTTPS" enabled="true">
<match url="(.*)" ignoreCase="false" />
<conditions>
<add input="{HTTPS}" pattern="off" />
</conditions>
<action type="Redirect" url="https://{HTTP_HOST}/{R:1}" appendQueryString="false" redirectType="Permanent" />
</rule>
समस्या जब मैं ब्राउज़र "https://myURL.com" यह मुख्य स्क्रीन पर अनुप्रेषित में टाइप हर चीज ठीक है, लेकिन जब मैं https बदलने के लिए अंदर मेरे web.config फाइल करने के लिए http "http://myURL.com" यह https://myURL.com/ पर पुन: निर्देशित "और यूआरएल में जोड़ें" bin/www "के अनुसार कि यूआरएल की तरह दिखता है" http://myURL.com/bin/www ", प्रतिक्रिया है:। पेज नहीं मिल रहा है
सवाल यह है कि एक रीडायरेक्ट करने के लिए है यूआरएल में जोड़े गए डेटा के बिना यूआरएल साफ़ करें?
मेरी web.config फ़ाइल का हिस्सा:
<rewrite>
<rules>
<!-- Do not interfere with requests for node-inspector debugging -->
<rule name="NodeInspector" patternSyntax="ECMAScript" stopProcessing="true">
<match url="^bin/www\/debug[\/]?" />
</rule>
<!-- First we consider whether the incoming URL matches a physical file in the /public folder -->
<rule name="StaticContent">
<action type="Rewrite" url="public{REQUEST_URI}" />
</rule>
<!-- All other URLs are mapped to the node.js site entry point -->
<rule name="DynamicContent">
<conditions>
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="True" />
</conditions>
<action type="Rewrite" url="bin/www" />
</rule>
<!-- Redirect all traffic to SSL -->
<rule name="Force HTTPS" enabled="true">
<match url="(.*)" ignoreCase="false" />
<conditions>
<add input="{HTTPS}" pattern="off" />
</conditions>
<action type="Redirect" url="https://{HTTP_HOST}/{R:1}" appendQueryString="false" redirectType="Permanent" />
</rule>
</rules>
</rewrite>
<!-- 'bin' directory has no special meaning in node.js and apps can be placed in it -->
<security>
<requestFiltering>
<hiddenSegments>
<remove segment="bin" />
</hiddenSegments>
</requestFiltering>
</security>
, जवाब के लिए माइकल धन्यवाद।
मैं समाधान के तुरंत बाद ही है कि बग गायब हो गया था –