Experimental Project

This is a sandbox project, which contains experimental code for developer use only.

The Short-hand path filter allows for short-hand redirect paths to be entered and replaced within any destination.

This module is very useful for handling long complex URLs that might be changed in the future.

If you have site that has long repetive URLS then this module is for you.

The included default short-hand paths are

  • n/% redirects to node/%
  • n/%/r/% redirects to node/%

Use Case

The US Patient Office (http://patft.uspto.gov) has very long URLs that really only contain 1 unique id.

So instead of entering

<a href="http://patft.uspto.gov/netacgi/nph-Parser?Sect1=PTO1&Sect2=HITOFF&d=PALL&p=1&u=%2Fnetahtml%2Fsrchnum.htm&r=1&f=G&l=50&s1=12345.PN.&OS=PN/12345&RS=PN/12345">Patent 12345</a>

you can just enter

<a href="/uspto/12345">Patent 12345</a>

This short-hand path would be entered as

Source:
uspto/%
Destination:
http://patft.uspto.gov/netacgi/nph-Parser?Sect1=PTO1&Sect2=HITOFF&d=PALL&p=1&u=%2Fnetahtml%2Fsrchnum.htm&r=1&f=G&l=50&s1=\1.PN.&OS=PN/\1&RS=PN/\1

Project Information