Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have two applications, one of which is a store and is located under the virtual directory "store", while the main "application" is the parent website/application. However, when visiting the the top-level website address, I would like to start people in /store/default.aspx (technically "/store/home") but this is not allowed in the entry box in IIS.

Currently I am doing the redirect manually in code, but was wondering if there was a way to do this in IIS or something. Thanks for any help.

share|improve this question

3 Answers 3

one way to do this is (but not the most convenient way)...

Create a new .ASP page called start.asp and put the following in it:

<% response.redirect("http://mysite/store/default.aspx") %>

(Or the asp.net alternative) If you do not have classic ASP, then create start.htm with :

<HTML>
<HEAD>
<meta http-equiv="refresh" content="0;url=http://mysite/store/default.aspx" />
</HEAD>
</HTML>

And simply set up either start.asp, start.htm or whatever you want as the new default document.

Anyone who vists http://mysite will be redirected to http://mysite/store

Whilst this may not be the best way, if you want to redirect everyone from the main site to the store/default, this should work fine. To get back to the main application, you just need to type an absoloute path of the existing file such as http://mysite/default.htm

If you want anything more advanced, you may want to take a look at URL Rewriting (I am sure there is a better link to a ready to download module, but I can't find it.)... but this may be over kill for what you need.

share|improve this answer

If you are asking if the default page for a folder can be a file outside that folder I think the answer is "no". I would redirect at the server side in ASP/ASPX, as opposed to a javascript/meta refresh redirect, as it will be almost as fast as if the option you required was possible.

share|improve this answer
    
It isn't outside the folder, it's just deeper in the directory structure (one level deeper). –  goldenratio Jan 12 '11 at 22:56

When adding the default page entry in IIS remove the proceeding forward slash. You can set the default page in a sub directory like "store" The entry in the documents section of IIS for the default page should look like this "store/default.aspx". This has worked for me in IIS6 and 3.5 .net application.

share|improve this answer

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.