Git Product home page Git Product logo

muraredirect's Introduction

MuraRedirect

Mura 7.1 plugin to manage redirections within Mura administration and keep usage statistics. Supports regular expressions.

Variables: $protocol (primary protocol), $domain (primary domain), $primary (primary protocol and domain)

Note about the path trailing slash

Mura adds a slash at the end of the URL if there is not one already. To match, all source paths should end with a /. The trailing slash can be removed by using a regular expression, for instance ^(.*)/ to capture all the path without the trailing slash.

Usage examples

Change a page path

These paths are exact, /a/b/ will not be affected.
Path: /a/
Target: /b/

Change a path using a regular expression

Path: ^/a/(.*)
Path regular expression: checked
Target: /b/\1

Redirect a domain to a specific path in the primary protocol and domain

Domain: a.com
Target: $primary/b

Redirect a domain to primary protocol and domain, preserving the path

Domain: a.com
Path: ^(.*)
Path regular expression: checked
Target: $primary\1

Redirect all other domains to primary protocol and domain, preserving the path

Domain: ^(?!$domain)
Domain regular expression: checked
Path: ^(.*)
Path regular expression: checked
Target: $primary\1

Redirect to a different domain, preserving the protocol and the path

Domain: a.com
Path: ^(.*)
Path regular expression: checked
Target: //b.com\1

Redirect a path to a different domain, removing the added trailing slash

Path: ^(/a.*)/
Path regular expression: checked
Target: https://b.com\1

Redirect to primary domain, preserving the protocol and the path

Domain: a.com
Path: ^(.*)
Path regular expression: checked
Target: //$domain\1

Redirect to HTTPS, preserving the domain and the path

Protocol: http
Domain: ^(.*)
Domain regular expression: checked
Path: ^(.*)
Path regular expression: checked
Target: https://\1\2

muraredirect's People

Contributors

damien-git avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

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.