|
| Directing to website |
 |
Fri, 28 Jul 2006 21:21:07 +000 |
Hello,
I have a Website with address http://www.abcdefg.com/MyApp
In IIS MyApp is a directory inside wwwroot and configured as a WebApplication.
From a different Server I am doing a redirect to this location. So
http://www.xyz.com for example
points actually to http://www.abcdefg.com/MyApp but it is configured that the
user is only seeing www.xyz.com in his webbrowser.
Okay, everything works fine so far but if want to access a content on the
website which needs a login ASP.NET wants to load login.aspx which is located
where it should (rootfolder of the app) when the users come from my redirection
(www.xyz.com) .NET cannot find the login.aspx page because it always wants to
load: http://www.xyz.com/MyApp/MyApp/Login.aspx.
So the question is: Why is .NET adding MyApp twice to the url?! this cannot work
of course because www.xyz.com is already pointing to
http://www.abcdefg.com/MyApp.
Can somebody help me?
|
| Post Reply
|
| Re: Directing to website |
 |
Sat, 29 Jul 2006 18:02:45 +000 |
It's behaving as you configured it. You pointed the redirection down one level,
and the code sneds a relative link to the login page, attached the the URL.
Either rewrite your code or stop rediecting below the root of the site.
Jeff
|
| Post Reply
|
| Re: Directing to website |
 |
Sun, 30 Jul 2006 12:30:47 +000 |
hmm.. I dont have any chance to rewrite the code. I could replace the login-path
in web.config with "../login.aspx" so it will search one level down
but the redirection-url (which i am not able to modify code-wise) after login
has still the directory MyApp/ in its name.
What I wanted to say is that .NET has mechanisms which gather information about
the relative url automatically, isn't there a possibility or switch in
web.config to define the root url globally or so?
|
| Post Reply
|
| Re: Directing to website |
 |
Sun, 30 Jul 2006 13:30:36 +000 |
You might try using BaseHref or Base. I don't think there's an equivalent to
Java's BaseURL, and I'm not certain any of them will trly solve your issue.
Changing the redirection would.
Jeff
|
| Post Reply
|
|
|
|
|
|
|
|
|
|