user1211185
user1211185

Reputation: 731

Deploying web application: How to make just one page secure (https)

I am a new to web deployment and I am deployed a website for testing on IIS, the website is non secure (http) site but one page should be secure (https).

Can anyone suggest me how I can achieve it and it should not warn the user while switching between 'http' and 'https'.

Upvotes: 3

Views: 1523

Answers (4)

patricgh
patricgh

Reputation: 403

In IIS 7 there is way to define new rules in "URL Rewrite" section for a particular web site. By this you can define a regular expiration and based on that you can redirect any pages which matches the expression to the page which you want. Lets say you are going to redirect http:\x.com\sample.aspx to https:\x.com\sample.aspx. For this do the following steps:

  • select your website on IIS
  • click URL Rewrite
  • Add Rule(s)
  • Select Blank rule
  • Then define your pattern in this case : lets say ^sample(any page start with sample). you can define any expression as you like.
  • in Action section select Redirect in Action type dropdown
  • in Redirect URL put https:\x.com\sample.aspx
  • save it and restart your website

you can then add any other rules as you want o match your request And also in some other complex scenarios you can write your own scripts here

Upvotes: 0

Scorpion
Scorpion

Reputation: 4585

If you need this commercially, I would recommend to use Helicon tool to redirect that particular page to HTTPS.

Using Helicon tool you can redirect the HTTP request to HTTPS for any specific page or whole site by writing the Rules.

Upvotes: 1

Saeed Neamati
Saeed Neamati

Reputation: 35842

SSL or Secure Socket Layer would be bound to a website through bindings. That is, you can tell IIS to redirect the incoming request traffics to a website, when for example the requested URL would be like http://domain.com/ or https://doamin.com, or http://200.202.150.200:8080/ or stuff like that.

Therefore, it's not a matter of IIS to set HTTPS only for one page. It's rather how to manage your URLs while redirecting user. In other words, it's a navigational matter.

Upvotes: 2

cowls
cowls

Reputation: 24334

I havent used IIS but I did this recently with Apache.

I did the following:

  • Set up a redirect for the page that you wish to secure so it redirects to HTTPS.
  • Set up a redirect for every other page to redirect from HTTPS to HTTP
  • Ensured static files such as images css and js are not affected by the above rules (These files need to work on both HTTP and HTTPS

Upvotes: 1

Related Questions