Redirect via web.config

C

CK

We moved an ASP.net to its own server. say it was someapp.somedomain.com,
there is a virtually directory on the new server that is where the app is
located. Currently users need to go to someapp.somedomain.com/appname, I
want the user to only have to put someapp.somedomain.com. Can I use the
web.config on the root to forward to the virtual directory? I was told I
could do this but i can not figure out how. I see where you redirect errors,
but not a redirect. I also tried pointing the default web to the virtual
directory and it gets into some loop. Any suggestions? All feedback is
appreciated.

TIA,
~CK
 
A

Alvin Bruney [MVP]

i think the suggestion might probably have been to add an entry into the web
config file and then read in that variable at run-time and redirect to it.
Since the redirect is to a variable, you can change the web config file at
run-time and not have to change code.

<name = "appredirect" value="default.aspx"/>

Response.Redirect(Configuration.appsettings["appredirect"]

--
________________________
Warm regards,
Alvin Bruney [MVP ASP.NET]

[Shameless Author plug]
Professional VSTO.NET - Wrox/Wiley
The O.W.C. Black Book with .NET
www.lulu.com/owc, Amazon
Blog: http://www.msmvps.com/blogs/alvin
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top