Find your content:

Search form

You are here

URL management / readable URLs in visual force

 
Share

We are considering developing a new version of our website (where our customers can purchase and manage certain types of content) on the force.com platform. We have a business/usability requirement that urls needs to be readable and user friendly.

Can this be achieved when using visual force pages ? So far I've not come across anything trying to research this.

We would want to avoid any URL's like http://example.com/services/‚Äčindex.jsp?category=legal&id=patents, but have them as http://example.com/services/legal/patents


Attribution to: Samuel De Rycke

Possible Suggestion/Solution #1

Assuming you are using Force.com Site for this, you can customize the url to your hearts content as long as you register your Force.com domain for your organization. You can do so under Setup -> Develop -> Sites. Then setup a redirect from your domain name to this custom url.

Check out the Sites FAQ for more info.


Attribution to: Anup

Possible Suggestion/Solution #2

You can do URL rewrites with Apex. See https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_site_urlRewriter.htm for a good explanation of how to do this.


Attribution to: Daniel Hoechst
This content is remixed from stackoverflow or stackexchange. Please visit https://salesforce.stackexchange.com/questions/122

My Block Status

My Block Content