BACKGROUND: We are giving our web site users the ability to create fundraising pages.
TECHNOLOGIES: asp.net 3.5 (web forms), Sitecore CMS 6.4, IIS 7
ISSUE: I’m trying to determine which url scheme is most convenient for users and which is more maintainable from a code perspective.
Idea #1: Create a subdomain – fundraising.mysite.com/johnspage
Idea #2: Use main domain – http://www.mysite.com/johnspage
Here are some thoughts that come to mind about using sub domains or not.
THOUGHTS:
-
We are using Sitecore CMS 6.4 so we will not be creating a separate website if we use a sub domain. The sub domain will simply point to the main domain.
-
If we use a sub-domain or not I plan on having a handler that redirects each fundraising page request to an actual page which looks up the users fund raising information and displays it. (the handler will inject a cookie or querystring). If we use sub domains it will be easier for our handler to know the request is for a fundraising page.
-
If we use a sub domain I want our handler to redirect to our actual site. This will avoid cookie issues between domains and sub domains. (Sure the cookie issues can be overcome, but I want to avoid them out of the box). So if the request is fundraising.mysite.com/johnspage the handler would turn this into http://www.mysite.com/actualpage?parameters… (or maybe use cookies)
-
With a subdomain we can avoid the issue where a user creates a page that has the same name as an existing ‘real’ page. We are using Sitecore CMS so pages don’t actually exist in Sitecore but we would not want a users fund raising page to resolve to a sitecore item. (if you are not familiar w/ sitecore you can think of trying to avoid the problem where the users fund raising page has the same name as one of your existing pages, using a subdomain makes this problem easier to manage. I guess you could also do this w/o a sub domain just put the handler logic early in the http request pipeline).
-
When the user goes to share their page, http://www.mysite.com/johnspage might be easier to remember for the user. They could simply say go to mysite.com/johnspage instead of fundraising.mysite.com/johnspage. The subdomain makes the url different then the main site and longer to pronounce. Sure users can cut and paste any url we give them, but if they are verbally sharing the url then having a sub domain could be inconvenient.
QUESTION: Would you use sub-domains or point to the main domain or is their another approach I am not thinking of? Any other thoughts you can provide?
Maybe I am misreading your question, but these statements are telling me that you don’t want an actual item for each fundraising ‘page.’
as well as:
I might suggest that you look into using ‘wildcards’ and setup a structure such as:
Now, your sublayout/rendering for the wildcard page would be responsible for resolving the specific user, fetching the data and render it.
There are a bunch of resources on Sitecore Wildcards such as:
http://www.sitecore.net/Community/Technical-Blogs/Getting-to-Know-Sitecore/Posts/2011/09/Wildcards-and-Data-Driven-URLs.aspx