tags:

views:

2898

answers:

5

Is there a clean way to redirect all attempts to going to an HTTP:// version of a site to its HTTPS:// equivalent?

A: 

I think by 'cleanly' you mean like with a 300 redirect. Config for a lot of servers & languages here.

slipsec
+2  A: 

As Duncan Smart posted in this question:

IIS Manager > Site properties > Directory Security > Secure Communications > Require Secure Channel (SSL)

dagorym
A: 

EDIT: I submitted this from the train via my iphone and now I see dagorym has in fact linked to another answer saying the same as mine. Apologies. dagorym I've voted your answer up, as this is in fact the correct response if a question has already been answered.

Use the custom error 403;4 to ascertain the URL requested and response redirect to that page with the https. Once you have clicked the require secure channel check box.

Tim Saunders
+2  A: 
mika
A: 

Just set up IIS 7. I was trying to require SSL for certain files and it's pretty bizarre that you have to right-click on the file, then switch to Features View, then run the SSL Settings thing. Selecting the file and clicking the Features View button at the bottom will have you working on the whole site again. It still makes it look like you're editing the whole site that way rather than with IIS6 and previous you would right-click > Properties and edit the single file right there. Thanks to mika's response since I didn't even realize it showed the file name in the header to let you know what the heck you're editing. I'm really starting to like Apache better finally with it's text file configuration editing.

Michael