Unfortunately on the master page of the site I have defined a internal redirect (umbInternalRedirectId), which seems to prevent the template access and have top priority - so this redirect is ALWAYS done.
Is there any change to access the template anyway?
Note: I do the internal redirect on the top level page in order to redirect to the default language homepage, since its a multi language site:
Nobody? Isn't that possible at all? Isn't it possible to serve a independant template without adding a (dummy) content while having a internal redirect on the top level page active?
If it truly has nothing to do with the CMS, perhaps you could add an entry to the "umbracoReservedUrls" setting in the web.config file, such as "~/Views/YourFile.cshtml" and access the page directly.
thanks for your suggestion, but unfortunately that didn't work either. I always get 404 while trying to retrieve the template through the correct path.
Is it a bug that the internal redirect avoids the direct template access or is it the desired behavior?
I should mention that I am using a Umbraco 7 instance in a complete MVC/Razor environment. WebPages are disabled by default, so I guess I could get it working changing that.
But another way I tried is to remove the internal redirect on the root node and do that redirection to the default language sub node (/de) by a rewrite rule in UrlRewriting.config:
Does that make sense? Any downside? Can I extend the rewrite rule that it only is used on a specific host (www.mysite.com), if different sites exist on the Umbraco installation?
How do others achieve that ("redirect" from the top root node to the default language in a multi lingual site)? Rewriting or internal redirect, or something else?
Internal Redirect vs Template access
Hi,
I want to access a page template directly, since it is a independant static fragment (nothing to do with the site design), so no content associated.
This generally works by calling http://www.site.com/TemplateAlias which is great.
Unfortunately on the master page of the site I have defined a internal redirect (umbInternalRedirectId), which seems to prevent the template access and have top priority - so this redirect is ALWAYS done.
Is there any change to access the template anyway?
Note: I do the internal redirect on the top level page in order to redirect to the default language homepage, since its a multi language site:
Nobody? Isn't that possible at all? Isn't it possible to serve a independant template without adding a (dummy) content while having a internal redirect on the top level page active?
If it truly has nothing to do with the CMS, perhaps you could add an entry to the "umbracoReservedUrls" setting in the web.config file, such as "~/Views/YourFile.cshtml" and access the page directly.
Hi Zac,
thanks for your suggestion, but unfortunately that didn't work either. I always get 404 while trying to retrieve the template through the correct path.
Is it a bug that the internal redirect avoids the direct template access or is it the desired behavior?
Best Regards Andreas
That's odd, because I have done this before and I'm not aware of any such bug.
Do you have the following in your web.config?
<add key="webpages:Enabled" value="true" />
Hi Zac,
I should mention that I am using a Umbraco 7 instance in a complete MVC/Razor environment. WebPages are disabled by default, so I guess I could get it working changing that. But another way I tried is to remove the internal redirect on the root node and do that redirection to the default language sub node (/de) by a rewrite rule in UrlRewriting.config:
<add name="defaultpage" virtualUrl="^/$" rewriteUrlParameter="ExcludeFromClientQueryString" destinationUrl="~/de" ignoreCase="true" />
Does that make sense? Any downside? Can I extend the rewrite rule that it only is used on a specific host (www.mysite.com), if different sites exist on the Umbraco installation?
How do others achieve that ("redirect" from the top root node to the default language in a multi lingual site)? Rewriting or internal redirect, or something else?
Best Regards
Hi Andreas,
I've mixed experiences when using an internal redirect on the top node. I always do this in urlrewriting.config like below or using the 301 URL Tracker package: http://our.umbraco.org/projects/developer-tools/301-url-tracker
-Amir
is working on a reply...