Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • How Do I Delete My Account? 68 posts 433 karma points
    Aug 04, 2015 @ 19:00
    How Do I Delete My Account?
    0

    Can you too access yourdomain.com/document-type-name ? Bug?

    Hi,

    I'm just wondering if you can access www.(yourdomain).com/(document-type-name).

    If I do It. I sometimes comes to logical pages and sometimes to really wierd ones on my own site. Ones that does not exist. I havn't created a /event page. But a "event" document type. But I can access a page /event. It somehow generates wierd text.

    Anyone else experienced the same?

  • Dennis Aaen 4500 posts 18255 karma points admin hq c-trib
    Aug 04, 2015 @ 19:13
    Dennis Aaen
    0

    Hi Daniel,

    Do you have an event template, if so that is why you can access a page like /event.

    Try to see this video about alt-template http://umbraco.tv/videos/umbraco-v7/implementor/fundamentals/templating/alt-template/

    Hope this helps,

    /Dennis

  • Dan Diplo 1554 posts 6205 karma points MVP 6x c-trib
    Aug 04, 2015 @ 19:20
    Dan Diplo
    2

    Daniel, it's the template you are seeing rather than the document type.

    You can disable this behaviour by editing umbracoSetting.config (in the /Config folder). Set disableAlternativeTemplates = "true" in the web.routing section.

    " By default you can add a altTemplate querystring or append a template name to the current URL which will make Umbraco render the content on the current page with the template you requested, for example: http://mysite.com/about-us/?altTemplate=Home and http://mysite.com/about-us/Home would render the "About Us" page with a template with the alias Home. Setting this setting to true stops that behavior"

  • How Do I Delete My Account? 68 posts 433 karma points
    Aug 05, 2015 @ 04:48
    How Do I Delete My Account?
    0

    Hi Dan,

    Thx for your answer. It was partly helpful. I followed your advice and it did the trick with the template rendering. However. I can still access the url domain.com/event - even though the template doesn't show.

    I want the 404 to fire. Do you know how to make that happen?

  • Mark Bowser 273 posts 860 karma points c-trib
    Aug 04, 2015 @ 23:51
    Mark Bowser
    0

    Ya, the alt templates can lead to some unexpected results, but they aren't all bad. They come in really handy when you want to do things like render a page with a print friendly template. I think cool stuff like that is why they come default enabled.

  • Dan Diplo 1554 posts 6205 karma points MVP 6x c-trib
    Aug 05, 2015 @ 07:27
    Dan Diplo
    0

    Daniel,

    I think you can remove the following line from 404handlers.config to totally remove alt template facility:

     <notFound assembly="umbraco" type="SearchForTemplate"/>
    

    You may also need to remove SearchForAlias too.

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies