How to force certain sections of the website to be browsed under SSL?

On our website certain sections or pages deal with sensitive user or account information. I want to force the users to browse those pages under HTTPS. Whereas other pages with public content should be available under HTTP. I was planning to install url Rewrite module on IIS and write rules to achieve this. I am not sure how to write the rules in web.config for redirection.

Url Rewriting in asp.net but maintaining the original url

Page aspxHandler = (Page)PageParser.GetCompiledPageInstance(virtualPath, context.Server.MapPath(virtualPath), context); aspxHandler.PreRenderComplete += AspxPage_PreRenderComplete; aspxHandler.ProcessRequest(context); When you call Page.Request.Url after this, you get the Url of the page you rewrote to …what I’m looking for is to do a rewrite, but for Page.Request.Url to remain as the original url that was passed in. Is that possible? Answers: Thank you for … Read more

Page get parameter doesn’t work with is_single() function

If exist the page parameter in the blog post, I have to redirect to the 404 page instead of current post URL.
I tried to check the current page type (is singular) and try to get page parameter in the function.php, but I couldn’t. It’s doesn’t work together. I need to implement it only for blog post.
If possible .htaccess redirect also fine