URL Routing Plugin Module

Available:

The URL routing plugin module is available in JIRA 6.0 and later.

Purpose of this Module Type

The URL routing plugin module allows add-ons to map any URL to one of their own choosing.   For more information, please see Guide - Using pretty URLs in a JIRA plugin.

Configuration

The root element for the URL routing plugin module is routing. It allows the following attributes and child elements for configuration:

Attributes

Name

Required

Description

Default

path

(tick)

The top level URL path that will be matched for further routing. No route rules will be executed if the start of the URL does not string match this path

N/A

key

(tick)

The unique identifier of the routing module.

N/A

Elements 

Name

Required

Description

Default

route

(tick)

Defines the routes you want to have in place

<N/A>

Route elements

Routes are how you switch from from a desired URL pattern to an actual internal one.

Attributes

Name

Required

Description

Default

from

(tick)

The URL pattern you want to route from. This is your desired pretty url pattern

You can use jax-ws syntax here in the URL pattern

N/A

to (tick)

The existing URL to which you want the pretty URL to go.

You can use jax-ws syntax here in the URL pattern

N/A
verbs  

The HTTP verbs that will be selectively routed. if you don't specify anything then all HTTP verbs will be routed.

The allowable verbs are get, put, post, head, delete, options and patch.

All HTTP verbs are routed

URL Routing example

This is a routing entry that causes a url like http://localhost:2990/jira/prettyurls/are/cool to be routed to http://localhost:2990/jira/secure/HorribleName.jspa?variableGoesHere=cool

<routing key="prettyurls-key" path="/prettyurls">
    <route from="/are/{variableGoesHere}" to="/secure/HorribleName.jspa"/>
    <route from="/can/{variableGoesHere}" to="/secure/HorribleName.jspa"/>
</routing>

For more examples see Guide - Using pretty URLs in a JIRA plugin

Was this page helpful?

Have a question about this article?

See questions about this article

Powered by Confluence and Scroll Viewport