You need to sign in to do that
Don't have an account?

Possible to use URL ReWriter to redirect to another page?
I'm trying to see if the URL ReWriter functionality can be used to dynamically redirect to another force.com site. The use case is that I'd like to migrate references to older content on another platform over to hitting a part of a force.com site. My plan was to CNAME a rewriter-based site with the old server's domain name, and then have this rewriter site dynamically place the user on a part of another force.com site.
I wrote a URL ReWriter class, and I'm assuming it's the mapping method that is doing all the work in this scenario. My debug code shows that the proper page reference is being set up and returned by the mapper method. When I visit the site (sandbox currently), I'm taken to whatever page is configured as the 401 Unauthorized page, even though I'm not referencing any platform data whatsoever (this is pure Apex logic). I've tried allowing the URL ReWriter class in Public Access Settings. The debug log doesn't even show any messaging related to why the unauthorized page is being shown.
It looks like everything but the actual redirect/URL rewrite is happening as written, but I have nowhere to go at this point. Any insight is appreciated.
I wrote a URL ReWriter class, and I'm assuming it's the mapping method that is doing all the work in this scenario. My debug code shows that the proper page reference is being set up and returned by the mapper method. When I visit the site (sandbox currently), I'm taken to whatever page is configured as the 401 Unauthorized page, even though I'm not referencing any platform data whatsoever (this is pure Apex logic). I've tried allowing the URL ReWriter class in Public Access Settings. The debug log doesn't even show any messaging related to why the unauthorized page is being shown.
It looks like everything but the actual redirect/URL rewrite is happening as written, but I have nowhere to go at this point. Any insight is appreciated.
I think I've found two issues though. 1, Sites doesn't support ":" as a character in the URL (lame, this is RFC compliant), and 2, Sites doesn't support rewriting to a non-relative URL. The documenation only comments on the fact that URL's are relative when calling PageReference.getURL() on PageReferences, not when building URLs.
Would love some feedback here, but I'm losing hope of being able to do this on the platform. Not looking forward to continuing to operate old servers when I could have gone no-software...:(
I sure hope that the Product Management team for Force.com Sites is paying attention to these incredibly insightful and useful questions from Paul...
Any help is appreciated. Thanks.