Copied to clipboard

Flag this post as spam?

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


  • Benjamin Ravn 35 posts 68 karma points
    Dec 03, 2014 @ 20:37
    Benjamin Ravn
    0

    301 Redirect content picker property?

    Hello

    I'm looking for a 301 redirect property, where I can use the content picker to choose a page, I want to redirect to with the status code 301.

    I can't find a package that solves the problem, and I can't find any built-in features within Umbraco either.

    I found this "hack" but it isn't the prettiest solution: http://our.umbraco.org/forum/using/ui-questions/55511-redirect-virtual-page-to-external-url

    Is there another way to do it, which already exists?

  • Dennis Aaen 4466 posts 18003 karma points admin hq c-trib
    Dec 03, 2014 @ 20:39
    Dennis Aaen
    0

    Hi Benjamin,

    Maybe the 301 URL Tracker package you be a option / solution for you. Try to have a look here; http://our.umbraco.org/projects/developer-tools/301-url-tracker

    Hope this helps,

    /Dennis

  • Benjamin Ravn 35 posts 68 karma points
    Dec 04, 2014 @ 06:38
    Benjamin Ravn
    0

    Hi Dennis

    Thank you for your quick reply!

    I have already installed the 301 Url Tracker-package, but it's not the solution I'm looking for.

    This package does exactly what I want, but it's not working on Umbraco 7: http://our.umbraco.org/projects/backoffice-extensions/permanent-redirect

  • Dennis Aaen 4466 posts 18003 karma points admin hq c-trib
    Dec 04, 2014 @ 08:50
    Dennis Aaen
    2

    Hi Benjamin,

    I have just tried install the permanent redirect package http://our.umbraco.org/projects/backoffice-extensions/permanent-redirect and it creates a 301 redirect. I just added a property to my documentype of the content picker datatype, and gives it the alias umbracoPermanentRedirect.

    After this I add this line to the webconfig file.

    <add name="terabytePermanentRedirect" type="Terabyte.Umbraco.Modules.PermanentRedirect.Redirect" />

    In the system.webServer modules part.

    <system.webServer>
        <validation validateIntegratedModeConfiguration="false" />
        <modules runAllManagedModulesForAllRequests="true">
          <remove name="WebDAVModule" />
          <remove name="UrlRewriteModule" />
          <add name="UrlRewriteModule" type="UrlRewritingNet.Web.UrlRewriteModule, UrlRewritingNet.UrlRewriter" />
          <add name="terabytePermanentRedirect" type="Terabyte.Umbraco.Modules.PermanentRedirect.Redirect" />
          <remove name="UmbracoModule" />
          <add name="UmbracoModule" type="Umbraco.Web.UmbracoModule,umbraco" />
          <remove name="ScriptModule" />
          <add name="ScriptModule" preCondition="managedHandler" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
          <remove name="ClientDependencyModule" />
          <add name="ClientDependencyModule" type="ClientDependency.Core.Module.ClientDependencyModule, ClientDependency.Core" />
          <!-- Needed for login/membership to work on homepage (as per http://stackoverflow.com/questions/218057/httpcontext-current-session-is-null-when-routing-requests) -->
          <remove name="FormsAuthentication" />
          <add name="FormsAuthentication" type="System.Web.Security.FormsAuthenticationModule" />
          <add name="ImageProcessorModule" type="ImageProcessor.Web.HttpModules.ImageProcessingModule, ImageProcessor.Web" />
        </modules>
    </system.webServer>

    Hope this helps,

    /Dennis

  • Benjamin Ravn 35 posts 68 karma points
    Dec 04, 2014 @ 09:08
    Benjamin Ravn
    0

    Cool Dennis!

    Thank you for testing it on a Umbraco 7. I actually didn't try since it was marked as working on only Umbraco 4.

    So I in some cases I can't take that marking for good. That's both good and a little annoying to know :-)

    Maybe there should be some sort of "voting", so people can mark an Umbraco version as working or not.

    Again, thank you very much!

    /Benjamin

  • Jan Skovgaard 11263 posts 23588 karma points MVP 8x admin c-trib
    Dec 04, 2014 @ 09:12
    Jan Skovgaard
    0

    Actually it's not version dependant but it requires .NET 4 and full trust for it to work :) - The stuff on the right is based on the reports people make. So anyone trying the package can actually add a vote for the version they test it on.

    /Jan

  • Benjamin Ravn 35 posts 68 karma points
    Dec 04, 2014 @ 09:16
    Benjamin Ravn
    0

    Thank you for enlightening me about that. That's cool :-)

  • Jan Skovgaard 11263 posts 23588 karma points MVP 8x admin c-trib
    Dec 04, 2014 @ 09:17
    Jan Skovgaard
    0

    Yup :) I just took the liberty of reporting it compatible with version 7.0 and 7.1 at least. Hopefully that will lead to less confusion for others in the future.

    /Jan

  • Benjamin Ravn 35 posts 68 karma points
    Dec 04, 2014 @ 09:25
    Benjamin Ravn
    0

    And maybe more people will use it now, instead of creating their own dirty hacks :-)

    A little off-topic to this post, but do you know how to enable nested archetypes? I can't select Archetype DataTypes inside another Archetype.

    Update: Update the web.config and it will work :-)

Please Sign in or register to post replies

Write your reply to:

Draft