6 votes
Accepted

URL rewriting for static resources

Disclaimer: a 'tricky' attack surface indicates this may not be the best kind of problem to solve with Salesforce ;) so double check your real business requirements and push back on those if necessary!...
user avatar
3 votes
Accepted

URL rewrite class not being called when http staus code is in URL

From the documentation User-friendly URLs must be distinct from Salesforce URLs. URLs with a three-character entity prefix or a 15- or 18-character ID are not rewritten. Under Restricted ...
user avatar
  • 2,309
3 votes
Accepted

Site.UrlRewriter and Wildcards

A workaround for this is to make the index page of the angular app the "default template" for the site. This will enable you to use Angular's routing capabilities.
user avatar
2 votes
Accepted

Why is my Site.UrlRewriter implementation not affecting URLFOR()

On a Force.com Site, the implementation of URLFOR() and Page.Master.getUrl() differ: URLFOR() returns an all-lowercase string without /apex prefix. PageReference.getUrl returns a first-letter-...
user avatar
  • 2,379
2 votes
Accepted

URL rewriter in JavaScript

Yes, you can easily do what you want to do with a rewriter. You'd do something like map all URL's beginning with /apex/page[/blah] to /apex/page?state=[/blah]. Then your controller would pass the ...
user avatar
  • 11.1k
2 votes
Accepted

Handling 'URL Does not exist' page

Got it resolved: Applied the appropriate condition (if else) on URL Rewriter Class and CommunitiesLandingController. Changed the Active Site Home Page on Community to newly created Visualforce Page '...
user avatar
2 votes
Accepted

Is it possible to URL rewrite the VF page itself on Force.com Sites?

Yes, you can use a URL rewriting class on your site to accomplish this. Hard to write an example in this answer as it is pretty complicated, but this post explains it well: https://developer....
user avatar
1 vote

sfdcIFrameOrigin parameter being added to Site url unnecessarily when using mobile

I could not find any documentation to back this, but it looks like it is added by Salesforce to distinguish between Classic and Lightning experience. Reference: http://forceguru.blogspot.com/2016/09/...
user avatar
1 vote
Accepted

View override fails when URL Rewriter is implemented

I fixed this by writing a controller extension with a method to do a page redirect and I got rid of the URLFOR in the VF page.
user avatar
  • 6,360
1 vote
Accepted

User context is always guest user in Site Url Rewriter class

You have no access to UserInfo.xx etc to figure out who the user is, so routes need to be generic, if you need to do user based routing best to bounce the user off a Visualforce page which does have ...
user avatar
  • 3,493
1 vote

Problems with Urlrewriter - what actually comes int through customerPortalUrl

You will need to write code in the mapRequestUrl method to match the url pattern of the request and let it pass through unchanged. String url = customerPortalUrl.getUrl(); if (url.contains('{...
user avatar
1 vote

Re-routing to Static Resources with Site's UrlRewriter resulting in 404

Site.UrlRewriter can only forward to a VisualForce page. So You can use a VisualForce to redirect again to the static resource pdf. Here is how you can do this. The GetResourceURL() method provides ...
user avatar
  • 12.8k
1 vote

GenerateUrlfor method invocation in Url Rewriter causing too many SOQL Exception

It simple, you have {!URLFOR($Page.CJ_Tour,null,[id=country.Tour__c])}" in an apex repeat thus being executed many time. You really should be doing this logic in the class then then using the page ...
user avatar
  • 53.1k
1 vote

URL masking force.com-sites/sites.com

I believe you can, I've not done it yet but if you have access to change the CNAME you should be able to. I think these are the steps: Register a Custom Domain: https://help.salesforce.com/apex/...
user avatar
  • 5,175
1 vote

URL Rewriting the Chatter Feed

I've successfully been able to use javascript/jquery to modify the links in the feed. This method was recommended and implemented by consultants from Salesforce.
user avatar

Only top scored, non community-wiki answers of a minimum length are eligible