sling-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "David G." <>
Subject Sling URL Mapping Questions
Date Sun, 05 Feb 2012 04:04:19 GMT
I've a couple questions about mappings in sling and best practices. 

I have a number of 10 sites on my current Sling install, and we will be expanding to 100+
over the next few years.

I have 5 environments: dev, test, staging, preprod, prod 
Dev is run off of: localhost
The other ends are run off: <subdomain>.<domain>.com,,,
Test through Prod also have certain pages that require HTTPS.

Sites are setup as follows:

I want to serve pages such that they appear to be served from: <subdomain><pages>.html

I thought it would be easy to create a simple sling:mapping node with sling:match => .+\.siteA\.com.\d*
  mapping /content/siteA/en/ : /

Unfortunately this only allows requests for to be routed in, however
all the links on the page are now pointing at http://null/other-pages.html 

Sling docs state that using regex wildcards in sling:match in the root mapping (hostname and
port) prevents outgoing mappings to work, thus the null.

What is the best practice for this? Currently the only work around I can see is making sling:Mapping
nodes for every subdomain,,,, etc. (along with any
specific mappings for corner cases like mapping <subdomain> to the home page.

Trying to maintain all these subdomains separately in each environment is a pain, and likewise
maintaining all variations for the site clutters the mappings very quickly. Also, this becomes
even worse when dealing with 10s of sites.

Thoughts on how to best handle these mappings so they can be easily/efficiently reused between
environments and the number of mappings can be minimized?


David Gonzalez
Sent with Sparrow (

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message