jjhayter
jjhayter

Reputation: 390

HTTP to HTTPS self-signed cert

I wanted to build a small site for myself to expose near read-only content mostly for my mobiles.

Firstly I use a dynamic DNS Service from no-ip yielding a simple host (ie http simplesite.serverhttp.com) that maps to my ip.

I wanted to ask if I could setup an HTTPS site in IIS7 using a self-signed certificate and when I goto my normal http site simply redirect to the HTTPS site. The HTTPS site will be using the ASP.Net membership system.

The flow would be along the lines of: http simplesite.servehttp.com redirect to https securesite.com which is bound via self signed certificate.

Can this be done?

Upvotes: 1

Views: 539

Answers (1)

whiskeyfur
whiskeyfur

Reputation: 746

This can be done, yes. in IIS you can redirect people to the HTTPS by using the URL Rewrite function. Some of the patterns you might want...

Using: Regular Expressions

Pattern: (.*)

Conditions: Add

-- Input: {HTTP_PROTOCOL}

-- Check if input string: Does not match

-- Pattern: HTTPS

RedirectURL = {R:0}

This isn't complete but it should give you a running start.

Upvotes: 1

Related Questions