Simon,
You are correct, the hash portion of the request is not sent to the server at 
all, no server side solution is going to solve this for you.
The solution would be a small peice of javascript hosted on the domain you 
don't want people to use redirecting to the new domain. Let me know if you'd 
like me to find this script, I've used it before on some ajax sites.

I am wondering why you need this functionality, the only scenario I can think 
of is that you have changed a domain name and need to redirect users with saved 
bookmarks to the new domain. Probably why others here havn't come across this 
before?
John. 



From: [email protected]
To: [email protected]
Subject: RE: Silverlight Deep linking and redirections
Date: Thu, 28 Oct 2010 11:40:15 +1000




I'm havn't tested the anchor Simon, pretty easy to test for you tonight if you 
like. Back to your solution to the problem, are you getting the anchor in your 
Request.Url.ToString()?
 
Good post here from Rick explaining ASP.NET paths:
http://www.west-wind.com/weblog/posts/132081.aspx
 
1st check the anchor is being set in that location header, fiddler is an 
awesome tool to check this, 2nd I guess check that this technique (301 
redirect) supports anchors in all browsers.
John.
 


Subject: RE: Silverlight Deep linking and redirections
Date: Thu, 28 Oct 2010 11:28:54 +1000
From: [email protected]
To: [email protected]







Thanks John,
 
Do you know if this method will preserve the anchor (eg. #screen) or only the 
path/parameters?
 
My current method preserves the path/parameters, but not the anchor.
 
Simon.
 




From: John OBrien [mailto:[email protected]] 
Sent: Thursday, 28 October 2010 11:09 AM
To: [email protected]
Subject: RE: Silverlight Deep linking and redirections
 
Do you have the option to do this in IIS instead? IIS6/7 both have a simple 
mechnism to do the redirect and preserve the path/parameters. Do a quick search 
if this is an option, we use for the typical www redirections.
 



Subject: Silverlight Deep linking and redirections
Date: Thu, 28 Oct 2010 11:02:40 +1000
From: [email protected]
To: [email protected]

Hi all,
 
Currently trying to setup some redirections on a Silverlight site that uses 
deep linking.  I’m attempting to do this via a 301 redirect in the via the 
Global.asax.
 
The issue is that the deep linking (anchors) gets lost with the redirection.
 
Eg.  Say we are attempting to redirect http://www.abc.com.au to 
http://www.abc.com.  Attempting to navigate to http://www.abc.com.au/#screen is 
redirecting to the default page of http://www.abc.com rather than 
http://www.abc.com/#screen . 
 
I can’t see that the deep link (anchor) part is available from Global.asax, 
meaning I can’t use it in the redirect.  My redirection code in global.asax 
looks like this:-
 
protected void Application_BeginRequest(object sender, EventArgs e)
{
    if 
(HttpContext.Current.Request.Url.ToString().ToLower().Contains("www.abc.com.au"))
    {
        HttpContext.Current.Response.Status =
            "301 Moved Permanently";
        HttpContext.Current.Response.AddHeader("Location",
            Request.Url.ToString().ToLower().Replace(
                "www.abc.com.au",
                "www.abc.com"));
    }
}
 
Has anyone had experience with this or can point me in the right direction?
 
Cheers
Simon Hammer.

_______________________________________________ ozsilverlight mailing list 
[email protected] 
http://prdlxvm0001.codify.net/mailman/listinfo/ozsilverlight 
______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email 
______________________________________________________________________
_______________________________________________ ozsilverlight mailing list 
[email protected] 
http://prdlxvm0001.codify.net/mailman/listinfo/ozsilverlight 
_______________________________________________ ozsilverlight mailing list 
[email protected] 
http://prdlxvm0001.codify.net/mailman/listinfo/ozsilverlight                    
                       
_______________________________________________
ozsilverlight mailing list
[email protected]
http://prdlxvm0001.codify.net/mailman/listinfo/ozsilverlight

Reply via email to