views:

99

answers:

2

I've seen a number of examples of the opposite, but I'm looking to go from an anchor/hash URL to a non-anchor URL, like so:

From: http://old.swfaddress-site.com/#/page/name
To:   http://new.html-site.com/page/name

None of the examples at http://karoshiethos.com/2008/07/25/handling-urlencoded-swfaddress-links-with-mod_rewrite/ have functioned for me. It sounds like REQUEST_URI has the /#/stuff in it, but neither me nor my Apache (2.0.54) see it.

Any ideas, past experiences or successes?

+1  A: 

Anything after the # is a fragment, and will not be sent to the webserver. You cannot capture it at any point there, you'll have to use a client-sided approach to capture those.

Wrikken
A: 

I'm the author of the post you linked to. Wrikken is correct, the content after the named anchor is not sent to the server unless something has mangled the URL along the way. On the client side, you need some JavaScript like this in your landing page to redirect the swfaddress links to corresponding URLs on another domain:

var re = new RegExp('#(.*)');
var redirectFragment = re.exec(document.location.toString());
if (redirectFragment!=null)
{
    document.location = 'http://new.html-site.com'+redirectFragment[1];
}
Rob Ruchte