+ Start a Discussion
steven_noblesteven_noble 

Retaining directory structure with URL masking

With Force.com Site's URL masking, will the pages at companyname.force.com/dir_a and companyname.force.com/dir_b appear to be at companyname.com/dir_a and companyname.com/dir_b? Or will they appear to be at the top level of companyname.com, regardless of where they are in the site?
Best Answer chosen by Admin (Salesforce Developers) 
BulentBulent
Site url is the combination of your force.com domain name and the path

so for your example
mycompany.force.com/products
mycompany.force.com/press

would be different sites. So you would be able to leverage the path field to mimic your menu/folder structure. But you can only have up to 25 sites in the same org.

However, you won't be able to mask both sites with the same custom domain name. Each would need to have a unique custom domain name (if you want to use custom domains).

The main reason to have multiple sites is to target different audience, to have a different look and feel, different access settings, different authentication setup.

What you really need is the support for multiple level folder hierarchy within the same site which we do not support.

I hope this clarifies the topic.
Message Edited by Bulent on 08-19-2009 01:40 PM

All Answers

BulentBulent
Custom Web Address is at the site level and it masks the full site url (force.com domain name + path).
RyanGuestRyanGuest
Steven, I noticed that you posted an idea because you didn't seem satisfied with Bulent's answer.

If you have a site like http://dellideas.force.com/ then

http://dellideas.force.com/resource/1231359401000/image_banner
and
http://www.ideastorm.com/resource/1231359401000/image_banner

will both preserve the path. Are you needing something more?
steven_noblesteven_noble
Ah, so Force.com _does_ retain the directory structure with URL masking. Magic.

My idea obviously then is redundant.

I wonder why the product manager in the forums told me the directory structure wasn't retained?

I'll see if there's an easy way to archive this thread.
BulentBulent
Steven,

I must have misunderstood your question. I thought you are talking about site url which has the following format:
http://abc.force.com domain name/path
and you can use your own custom domain name like www.abc.com to mask this URL

I didn't realize your question was about the final url for the static resources used in site context
steven_noblesteven_noble
OK, I'll try to restate the question without reference to "static resources" or any other Salesforce terminology:

Imagine I use Force.com sites to publish a web site at mycompany.force.com.

I use Force.com sites to ensure users find this web site at mycompany.com.

My question is this: When users browse the site at mycompany.com, do they see the same menu structure in the URLs as they would if they browsed the site at mycompany.force.com?

For example, do they see mycompany.com/products/chairs/chair1.htm

From Ryan's contribution, I'd say the answer is yes, which is great news.
BulentBulent
The answer is no. We do not support multiple folder hierarchy for pages
If you use force.com domain name you get to chose a path like abc.force.com/developer/page_name
if you use your custom domain name then the same example would be abc.force.com/page_name
steven_noblesteven_noble
So mycompany.force.com/products/default and mycompany.force.com/press/default are both displayed at mycompany.com/default?
steven_noblesteven_noble
Hold, I think you're saying:

# mycompany.force.com/tables = mycompany.com/tables
and
# mycompany.force.com/chairs = mycompany.com/chairs

but there can be no:

# mycompany.com/products/tables

because there can be no:

# mycompany.force.com/products/tables

correct?
BulentBulent
Site url is the combination of your force.com domain name and the path

so for your example
mycompany.force.com/products
mycompany.force.com/press

would be different sites. So you would be able to leverage the path field to mimic your menu/folder structure. But you can only have up to 25 sites in the same org.

However, you won't be able to mask both sites with the same custom domain name. Each would need to have a unique custom domain name (if you want to use custom domains).

The main reason to have multiple sites is to target different audience, to have a different look and feel, different access settings, different authentication setup.

What you really need is the support for multiple level folder hierarchy within the same site which we do not support.

I hope this clarifies the topic.
Message Edited by Bulent on 08-19-2009 01:40 PM
This was selected as the best answer
steven_noblesteven_noble
I think I get it. Looking at Idea Storm, which I believe is a Force.com site, I see that everything is at the top level (the limitation you're mentioning) but every page nonetheless has a unique, permanent URL (my requirement). For example:

http://www.ideastorm.com/ideaView?id=087700000000F6sAAE#comments

If this is correct, then we're good to go. Thanks for sticking with me.
RyanGuestRyanGuest
Steven - you're correct. Ideastorm is a Force.com site and every page has a unique URL.

Sorry my previous explaination wasn't very clear.