Important

  • The routing overrules permalinks and works like a whitelist. Only correct entered routes will go through. You should test the routing before using on production environments.
  • Be careful using several routing- or redirect plugins at the same time.
  • Do not forget to delete all your page caches after enabling/disabling the routing to prevent unwanting routing behavior.

Basics

  • The routes are relative to your wordpress installation url
  • The used protocol (HTTP or HTTPS) will be ignored
  • GET params will be ignored
  • Routes are case sensitive
  • The route / allows the index page (Check the checkbox "Allow index page")
  • Wildcard * allows a single term with an arbitrary value (e.g. category/*/page/*)
  • Wildcard ** permits all possible combinations of terms (e.g. category/**) This wildcard is only allowed at the end of a route
  • Wildcards are only allowed as complete terms. Correct: /foo/*/bar/** Wrong: /foo/ba*/test**

Locked out?

If you locked yourself out, you can disable the active routing with editing wp-config.php:

Add the line: define(ALWDRTS_DISABLE_ROUTING, true);

After reviewing the problem change the value back to false (or remove the line again) to be able to use the routing functionality again.

This should not happen, but if other plugins interfere with the backend routes, this is an emergency exit. The routing gets disabled and the backend can be accessed again.

Example #01 - Allow the index page

Route: / (or check the checkbox "Allow index page")

  • www.example.com
  • www.example.com?param=123
  • www.example.com/contact
  • www.example.com/page/1
  • www.example.com/2011/01/01/test

Example #02 Allow a specific route

Route: contact

  • www.example.com/contact
  • www.example.com/contact?param=123
  • www.example.com/contacts
  • www.example.com/contact/new
  • www.example.com/menu/contacts

Example #03 - Allow a route with wildcard * (1 term with arbitrary value)

Route: page/*

  • www.example.com/page/1
  • www.example.com/page/2
  • www.example.com/page/3
  • www.example.com/page
  • www.example.com/page/1/2

Example #04 - Allow a route with wildcard * (1 term with arbitrary value)

Route: category/*/page/*

  • www.example.com/category/1/page/1
  • www.example.com/category/2/page/3
  • www.example.com/category/100/page/20
  • www.example.com/category
  • www.example.com/category/100/
  • www.example.com/category/100/page
  • www.example.com/category/100/page/1/20
  • www.example.com/page/100/category/1/20

Example #05 - Allow a route with wildcard ** (multiple terms with arbitrary values)

Route: archive/**

(This wildcard is only allowed at the end of the route)

  • www.example.com/archive/2015
  • www.example.com/archive/2015/08
  • www.example.com/archive/2015/08/01
  • www.example.com/archive/2015/08/01/books
  • www.example.com/archive

Example #06 - Allow route with wildcard ** (multiple terms with arbitrary values)

Route: /**

This route allows all requests except the index page.