Try our conversational search powered by Generative AI!

Redirecting to secure URLs

Vote:
 

I have a web.production.config file that has the code to redirect to HTTPS:


 

When I deploy to integration (where there are no SSL's) I get a internal server error, not sure if this is right because of the none existant ssl's.

Unsure if i put it live is it going to cause an error on the live sites?

#193285
May 28, 2018 12:20
Vote:
 

First, I would write the rule like this

	<rule name="Redirect all hosts to https" stopProcessing="true">
		<match url="(.*)" />
		<conditions logicalGrouping="MatchAll">
			<add input="{HTTPS}" pattern="off" />
		</conditions>
		<action type="Redirect" url="https://{HTTP_HOST}{REQUEST_URI}" redirectType="Permanent" appendQueryString="false" />
	</rule>

Do you mean integration as in DXC Service?
If it is, it has SSL, all environments there have it, but if you have a custom DNS you need to fix the certificate yourself

#193293
Edited, May 28, 2018 12:37
Vote:
 

Thanks , Yes DXC, we dont have ssl for the integration url just the production.

I have add the code in the web config and it still gives me a internal server error?

#193295
May 28, 2018 12:49
Vote:
 

That is strange, we use DXC Service and we have SSL in integration, it is standard for the Azure-dns at least.

I changed my example to one that we use at a DXC Service solution that works in integration.

Maybe something else that is problem?

#193296
May 28, 2018 13:22
Vote:
 

That is strange, we use DXC Service and we have SSL in integration, it is standard for the Azure-dns at least.

I changed my example to one that we use at a DXC Service solution that works in integration.

Maybe something else that is problem?

#193297
May 28, 2018 13:22
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.