Skip to content

Instantly share code, notes, and snippets.

@rwunsch
Forked from benfortuna/Sling url mapping
Created January 5, 2017 12:20
Show Gist options
  • Save rwunsch/1be65b5c01eafad5b7cdbe38118998ec to your computer and use it in GitHub Desktop.
Save rwunsch/1be65b5c01eafad5b7cdbe38118998ec to your computer and use it in GitHub Desktop.
/etc/map
+-- http
+-- example.com.80
| +-- sling:redirect = "http://www.example.com/"
+-- www.example.com.80
| +-- sling:internalRedirect = "/example"
+-- any_example.com.80
| +-- sling:match = ".+\.example\.com\.80"
| +-- sling:redirect = "http://www.example.com/"
+-- localhost_any
| +-- sling:match = "localhost\.\d*"
| +-- sling:internalRedirect = "/content"
| +-- cgi-bin
| | +-- sling:internalRedirect = "/scripts"
| +-- gateway
| | +-- sling:internalRedirect = "http://gbiv.com"
| +-- (stories)
| +-- sling:internalRedirect = "/anecdotes/$1"
+-- regexmap
+-- sling:match = "$1.example.com/$2"
+-- sling:internalRedirect = "/content/([^/]+)/(.*)"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment