Iron Speed Technical Forums
Sign up Latest Topics
 
 
 


Reply
  Author   Comment  
SkyForum

Registered:
Posts: 59
Reply with quote  #1 
I just upgraded my server and added SSL. All is well (after I fixed my google api) nbut now have a new problem. Some of my users keep trying to go to the old http site instead of he new url. I need to add a redirect to my iis7 windows 2008 server that forces everyone into the new https by default. The recommendation I find says to add the following code to my web.config file for the site. I also need to install a rewrite mod to my iis7. 

My question does anyone see any issues arising from me changing my web.config file to accommodate this? 

<?xml version="1.0" encoding="UTF-8"?><configuration><system.webServer><rewrite><rules><clear/><rulename="Redirect to https"stopProcessing="true"><matchurl=".*"/><conditions><addinput="{HTTPS}"pattern="off"ignoreCase="true"/></conditions><actiontype="Redirect"url="https://{HTTP_HOST}{REQUEST_URI}"redirectType="Permanent"appendQueryString="false"/></rule></rules></rewrite></system.webServer></configuration>
Thanks ahead of time for your help. 

__________________
As you get older, your patience begins to wane. As a result, you become the "Grumpy Old Guy".  At 60 years of age I have become this guy. I am now faced with the dilemma of an old dog learning new relationship tricks to survive. [rolleyes]
SkyForum

Registered:
Posts: 59
Reply with quote  #2 
Learn as I go, that's my mantra. Using the url rewrite mod in iis7.5 I can create the proper http to https rule. It makes the necessary changes in the web.comfig file in my web application but it does not work. I am at a loss. You can still log into the http site and it does not redirect you to https. Is there something in the web.config file that would prevent this rule from being applied?

I know everyone is smacking their foreheads when they read my questions but please help. LOL.  

__________________
As you get older, your patience begins to wane. As a result, you become the "Grumpy Old Guy".  At 60 years of age I have become this guy. I am now faced with the dilemma of an old dog learning new relationship tricks to survive. [rolleyes]
SkyForum

Registered:
Posts: 59
Reply with quote  #3 
LOL. You guys.... You knew if you waited long enough I'd figure it out on my own. [smile]

Doing a URL Redirect at the site level does not work with the web.config file created by ISD. Probably because of some sort of code conflict of which I have no idea. (and don't really care to know).

I discovered that I can do it at the server level instead. This does not change the web.config file at the site level. It stores it globally in the applicationHost.config file. 

Heck I even figured out how to make rules that only affect sites that have SSL and does not force non SSL sites on my server to follow the rule. I like this rewrite mod doohickey, pretty powerful tool!

Kudos to me!

Thanks for the help. 

__________________
As you get older, your patience begins to wane. As a result, you become the "Grumpy Old Guy".  At 60 years of age I have become this guy. I am now faced with the dilemma of an old dog learning new relationship tricks to survive. [rolleyes]
Previous Topic | Next Topic
Print
Reply

Quick Navigation:

Easily create a Forum Website with Website Toolbox.

Download Iron Speed Designer

Terms of Service Privacy Statement