1

I'm using below steps to for HTTP to HTTPS redirect,

Pick the virtual directory you want to redirect. e.g. http://yourdomain.com/ Click HTTP Redirect under IIS in the IIS management console In the HTTP Redirect Dialog:

  1. Check "Redirect requests to this destination"
  2. Enter your new path ending with $S$Q: e.g. https://www.yourdomain.com$S$Q
  3. Counter-intuitively check "Redirect all request to exact destination (instead of relative destination)"

Issue is I have youtube channel link as a prameter, so when redirect it converts the channel url to lowercase, eg: https://www.youtube.com/channel/uc0-zq_3.....

Since youtube channel links are case sensitive it does not work.

Is there any way I can fix this using same?

KRR
  • 465
  • 3
  • 6
  • 22

2 Answers2

4

Why write code?

Go to the root of your website in Kentico and select the page then Properties > Security > Access. Select the Yes radio button to always require SSL. This property setting will be inherited automatically by all pages recursively. So no matter if someone goes to HTTP, they will always be redirected to HTTPS.

Now if there are specific pages in which you don't want or need HTTPS, then simply override those specific pages by not inheriting that particular property on that page.

  • Note: Make sure IIS has bindings for both HTTP and HTTPS.
Brenden Kehren
  • 5,919
  • 16
  • 27
  • redirection is happening via /CMSModules/Newsletters/CMSPages/Redirect.ashx so not sure your solution is working for such – KRR Dec 02 '16 at 16:19
  • 1
    Then require the admin to use https in the settings. Should have the same effect. – Brenden Kehren Dec 04 '16 at 05:48
0

You can write a redirect rule in web.config file. Loot at the correct answer here: How to force HTTPS using a web.config file

Community
  • 1
  • 1