Solved

Point subdomain to sub-directory

Posted on 2010-09-07
7
443 Views
Last Modified: 2012-05-10
Hello,

I have an ASP.NET application.

let's call it www.myapp.com

I want to point a subdomain to a subdirectory of it

e.g., pub.myapp.com would point to www.myapp.com/pub

It wouldn't be a redirect. It would be more like an alias.

I tried creating an IIS website and pointing it's home directory to the subdirectory. But, it creates a web.config file and I get errors when I try to go to it via a browser. It wants the app root, seemingly, to be in that subdirectory.

What am I doing wrong?

Thanks in advance,

Steve
0
Comment
Question by:skbohler
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
7 Comments
 
LVL 34

Expert Comment

by:it_saige
ID: 33618008
Are you using IIS6 or IIS7?

What errors are you receiving (associated error numbers and code would be helpful)?

-saige-
0
 

Author Comment

by:skbohler
ID: 33618107
IIS 6

I'm getting an ASP.NET compilation error

BC30002: Type 'UserAuth' is not defined.

If I go directly to the subdirectory outside of using the subdomain, it works fine.
0
 
LVL 34

Expert Comment

by:it_saige
ID: 33618289
How did you create your subdomain (in other words did you create it as a new website under an existing website or as a new website directly under the server)?

You mention that you go directly to the subdirectory outside of using the subdomain, could you elaborate a bit?

-saige-
0
Optimize your web performance

What's in the eBook?
- Full list of reasons for poor performance
- Ultimate measures to speed things up
- Primary web monitoring types
- KPIs you should be monitoring in order to increase your ROI

 

Author Comment

by:skbohler
ID: 33618391
I created it as a new website on the same level as my other websites. Didn't know you can create a website under an existing website.

What I meant was that if I go to www.myapp.com/pub, I don't get the error.
0
 
LVL 34

Accepted Solution

by:
it_saige earned 500 total points
ID: 33619046
ah, so your getting an error when you browse to the site using pub.myapp.com as opposed to www.myapp.com/pub...

I think I have a better understanding...

Let me paraphrase your question.

You have an existing .NET web application/site [www.myapp.com].  In this web application/site you have a directory called pub.  You wish to publish pub as a subdomain [pub.myapp.com].

Am I following you correctly?

-saige-
0
 

Author Comment

by:skbohler
ID: 33619091
Yep, that's correct.
0

Featured Post

Ready to get started with anonymous questions?

It's easy! Check out this step-by-step guide for asking an anonymous question on Experts Exchange.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A quick way to get a menu to work on our website, is using the Menu control and assign it to a web.sitemap using SiteMapDataSource. Example of web.sitemap file: (CODE) Sample code to add to the page menu: (CODE) Running the application, we wi…
When it comes to showing a 404 error page to your visitors, you do not want that generic page to show, and you especially do not want your hosting provider’s ad error page to show either. In this article, I will show you how to enable the custom 40…
There are cases when e.g. an IT administrator wants to have full access and view into selected mailboxes on Exchange server, directly from his own email account in Outlook or Outlook Web Access. This proves useful when for example administrator want…
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…
Suggested Courses

623 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question