Take the 2-minute tour ×
Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

We have a website which has a Virtual Directory containing the secure portion of the website.

If users come to http://www.mydomain.com, they should get directed to default.aspx of the main site, but if they go to https://www.mydomain.com, they should go to default.aspx of the virtual directory.

The default page for the main site works fine, as does the secure page if I navigate to it using the full name, however I can't figure out how to set the default page for https traffic that doesn't specify a specific page.

  1. http://www.mydomain.com - Works
  2. https://www.mydomain.com - Page Not Found
  3. https://www.mydomain.com/myvirtualdirectory - Page Not Found
  4. https://www.mydomain.com/myvirtualdirectory/default.aspx - Works

What do I need to do to make links 2 and 3 load the default page show in 4?

My website is running on IIS 6.0 in Windows Server 2003

share|improve this question
add comment

4 Answers 4

up vote 2 down vote accepted

Scott Forsyth - MVP's answer to 'Different file locations for http v https on IIS?' suggests that you look at Failed Request Tracing to help identify the fault, I'd also suggest checking the IIS logs to see exactly what is happening to the request for default.aspx, it must be going somewhere!

share|improve this answer
    
Thank you, the issue was with an unrelated website hosted on a different IP address on the same machine which is rewriting URLs that didn't have a default page specified to add index.php to it. I would have never found this without the IIS error logs. –  Rachel Apr 8 '12 at 15:30
add comment

I think you have to enable https in IIS itself. The following links will help

http://support.microsoft.com/?id=324069

http://support.microsoft.com/?id=298805

share|improve this answer
    
It is enabled.... I want to know how to set the default page for it though because right now I have to manually type in the page name to access it. For example, https://www.mydomain.com returns a Page Not Found, however https://www.mydomain.com/default.aspx will load correctly –  Rachel Mar 24 '12 at 3:37
2  
@Rachel have you looked at this serverFault question, the circumstances sound very similar to yours... The second answer has some helpful tips on tracing the source of the error –  toomanyairmiles Mar 27 '12 at 19:10
1  
@Rachel also see this answer, again at server fault –  toomanyairmiles Mar 27 '12 at 19:12
    
@toomanyairmiles I am not sure how those links are supposed to help. I have SSL setup correctly, and it works - IF I use the full path name of the page I am trying to reach. I want to know how to make https://mydomain.com/mysecurevirtualdirectory display the Default.aspx page for the virtual directory instead of a 404 Not Found error. –  Rachel Mar 30 '12 at 19:54
    
@Rachel if you read the answers to both questions they may give you some clues on how to debug this, particularly the answer from Scott Forsyth - MVP as it appears to directly address your situation. –  toomanyairmiles Apr 4 '12 at 23:24
show 5 more comments

The easy way to redirect could possibly lie in doing a 301 from your option 2 & 3 listed above.

In essence make a default page that the user lands on and set that to automatically redirect to the desired page?

share|improve this answer
add comment

It sounds as though you will need to set up default documents for the secure site, as described in Setting Up Default Documents from the IIS 6.0 documentation:

  1. In IIS Manager, double-click the local computer, right-click the Web Sites folder or an individual Web site folder, and then click Properties.

Note: Configuration settings made at the Web Sites level are inherited by all of the Web sites on the server. You can override inheritance by configuring the individual site or site element.

  1. Click the Documents tab.

  2. Select the Enable default content page check box.

  3. Click Add to add a new default document to the list.

share|improve this answer
    
This is already setup on both the main site, and the virtual directory. –  Rachel Apr 5 '12 at 15:34
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.