I think the altTemplates have been removed from your URL's here. But anyway, you could easily do this by using a url rewrite, check out the /config/urlrewriting.config for a little bit of an example. If you need help constructing a rewrite rule then just shout here and I'll see what I can come up with.
If you want a more advanced option, then I can recommend ISAPI Rewrite. It can fx. look at the user agent string, and append a ?alttemplate=xxx to the query. Not sure if the build in urlrewriting.config can do that.
Soeren's right, if you need more advanced detection based on the user agent, then ISAPI Rewrite is much better, as UrlRewriting.Rewrite only supports basic rewriting rules, and doesn't check the user agent at all. If you only want to do it based on the domain, then you can do that with the basic UrlRewriting.Rewrite config file.
Using alttemplate based on hostnamesettings
I understand how alttemplate can work, and think it is brilliant, however I would like to have the template used to be decided by the subdomain of the
Regular template
http://domain.com/pagename.aspx
&
http://www.domain.com/pagename.aspx
iPhone template
http://i.domain.com/pagename.aspx
Regular Mobile template
http://m.domain.com/pagename.aspx
Suggestions?
I think the altTemplates have been removed from your URL's here. But anyway, you could easily do this by using a url rewrite, check out the /config/urlrewriting.config for a little bit of an example. If you need help constructing a rewrite rule then just shout here and I'll see what I can come up with.
urlrewriting.config is definately the way to go.
If you want a more advanced option, then I can recommend ISAPI Rewrite. It can fx. look at the user agent string, and append a ?alttemplate=xxx to the query. Not sure if the build in urlrewriting.config can do that.
/SoerenS
Soeren's right, if you need more advanced detection based on the user agent, then ISAPI Rewrite is much better, as UrlRewriting.Rewrite only supports basic rewriting rules, and doesn't check the user agent at all. If you only want to do it based on the domain, then you can do that with the basic UrlRewriting.Rewrite config file.
is working on a reply...