2

Here is my problem.

When I set up the portal the requirement was simple - just one site collection. I set up the site collection under the root and added some variations. Looks something like http://portal/.

Now the requirements have changed. A mobile site is needed and our solution is to have a dummy site which tests for a mobile client and performs a redirect to either the mobile site collection or the original non-mobile collection. This redirect site ought to be directly under the root but the root is already occupied.

The redirect and the mobile site must be open for anonymous access, the standard site is only for authenticated users.

My question: how can I move the root site with its variations to a new location e.g. http:/portal/sites/standard?

The end result should be something like this:

http://portal/                    (redirects to appropriate sub site)
http://portal/sites/standard      (contains standard browser content)
http://portal/sites/mobile        (contains mobile browser content)

2 Answers 2

3

The Variations mechanism is very rigid. As soon as you have very specific requirements, it's likely not to be possible (out of the box).

Variations work only within an individual site collection. You can't have variation labels living outside your site collection which has the Variations set up.

I would look into options that allow you to make it appear as if the mobile site is at the root (i.e. use url rewriting in a httpmodule), when in fact it is a subsite under your Variation Root. No idea if this will actually work, but my instinct hints me into this direction.

You could extend the web app with another iis site, listening for a particular host header (your mobile one) and register a httpmodule in the web.config (only for this extended iis site) to rewrite the url for incoming requests to inject the mobile variation web.

Lets say your mobile web sits at http://portal/mobile and http://mobileportal/portal (extended), both pointing to the same web in the same site collection. You could then rewrite requests coming in at http://mobileportal/* to http://mobileportal/mobile/*, without the user seeing that you squeezed in the /mobile bit.

Again, I haven't tested it, but it might work!

0

You can customize the variation root landing logic, to redirect to different site of your choice

See this example

http://msdn.microsoft.com/en-us/library/ms562040.aspx

1
  • Even though you can customise the redirection, the sites and pages outside your main site collection are not "linked", in terms of Variation Source and Target. Commented May 12, 2010 at 11:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.