Code Monkey home page Code Monkey logo

redirectmanager's Introduction

Redirect Manager

Redirect Manager is simple, portable, extendable, open source redirect tool for Episerver projects.

Description

It's built to be as minimalistic as possible and as an example of simple Episerver add-on. It requires only 7 files for business logic and data access, 2 controllers and 1 view.

New 2.0 version has a bit smaller appearance and multi-site support

Preview:

Features

  • Easily create redirects to any URLs or to Episerver pages.
  • Wild card rules.
  • Reordering and prioritizing rules.
  • Multi-site support.
  • Allow moving and changing URLs of Episerver pages and the redirects still works.
  • All redirects are HTTP 301 (Moved permanently), because search engines only follow this kind of redirects.
  • Access restrictions allow usage of rule manager to only administrators.
  • And the most important: It's open Source and it's yours to extend and manipulate! Solita <3 Open Source!

The key features actually are what this add-on is NOT

  • No CSS or styling;
    There isn't even a single line of CSS or styling in project. Frameworks as Bootstrap give enough styles for simple solutions and it's responsive OOTB.
  • No NuGet packaging;
    It's not a NuGet package because NuGet packages aren't agile enough. It's easier to copy&paste changes.
  • No DDS;
    We have come to conclusion that Dynamic Data Storage isn't scalable and functional for our purposes.
  • No Dojo Toolkit, No Dijit;
    Dojo framework is way too large and complicated framework for simple solutions like this.
  • No extra controllers and models;
    MVC is nice concept, but controllers and models are often not important. Coding some trivial logic to views will your project more agile.
  • No REST;
    Normally we would have used AngularJS and Web API, but with administration tools it's not necessary.
  • No Translations;
    Administers normally do not need localizations, so why waste of time and energy.
  • No Unit Tests;
    There is no point of testing trivial things and unit testing != no bugs.

Redirection rules

Here's couple of examples what kind of rules are possible.

Minimum Requirements

  • Episerver 7 MVC project with C#7
  • Entity Framework

Installation instructions

  1. Install Entity Framework from NuGet.
    https://www.nuget.org/packages/EntityFramework
  2. Copy files into your project
  3. Add .MapMvcAttributeRoutes() to RegisterRoutes override in Global.asax.cs
  4. Apply manually Web.Config transformations
  5. Go to www.yourproject.com/Admin/RedirectManager

Instructions for usage

File structuce

Basic 404 redirect logic

Auto wire up

You can automatically populate the RedirectManager with data on following events from editors, moving pages in structure, renaming url segment and deleting from Waste Basket. Just put this in your InitializableModule:

var events = ServiceLocator.Current.GetInstance<IContentEvents>();
            events.MovingContent += RedirectKeeper.Page_Moving;
            events.PublishingContent += RedirectKeeper.UrlSegment_Changed;
            events.DeletedContent += RedirectKeeper.Page_Deleted;

redirectmanager's People

Contributors

ericherlitz avatar huilaaja avatar lucgosso avatar tomahg avatar tomaszmadeyski avatar

Stargazers

 avatar

Watchers

 avatar

Forkers

sinanaltaii

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.