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!...
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 ...
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.
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-...
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 ...
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 '...
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....
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/...
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.
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 ...
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('{...
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 ...
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 ...
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/...
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.
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
urlrewriter × 30force.com-sites × 13
apex × 10
visualforce × 9
community × 3
force.com × 3
urlfor × 3
javascript × 2
static-resources × 2
lightning × 1
chatter × 1
webservices × 1
governorlimits × 1
customer-community × 1
lightning-community × 1
knowledge × 1
dynamic-visualforce × 1
urlhacking × 1
images × 1
content × 1
button-overrides × 1
guest-user × 1
angularjs × 1
custom-profile × 1
angular × 1