sling-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "David G." <>
Subject Re: Sling URL Mapping Questions
Date Tue, 07 Feb 2012 03:42:42 GMT

I'm using dispatcher running under httpd as cache.

One of the things I am trying to get around is serving pages from the usual /content/<site>/<lang>/page.html

I need to validate, but I think I could

1) handle incoming rewrites: >  /content/mysite/en/page.html 
2) use the JCR Resource Resolver mappings to rewrite all my in-page links to point at /page.html

I haven't looked at the source code to see why sling can't handle bi-directional mapping when
using regex (it seems like it should be able to, but I must be missing something).


David Gonzalez
Sent with Sparrow (

On Monday, February 6, 2012 at 12:29 PM, James Stansell wrote:

> On Mon, Feb 6, 2012 at 5:26 AM, David Gonzalez < (>wrote:
> > Does mod-rewrite support rewriting all the links in the documents
> > returned in the response?
> > 
> Probably not. In fact right now a lot of our links are
> /content/<site>/en/page.html and we have rewrite rule which gives a
> redirect to /page.html.
> It should be possible to use a sling filter to modify the links when
> serving the page but we haven't looked into that yet.
> > Have you seen perf hits doing this? (I'm assuming every html response
> > must be parsed and rewritten.)
> > 
> As far as I know our performance concerns are in other areas. Our sling is
> actually part of CQ5 so we already were using httpd in order to host the
> dispatcher plugin for caching the pages. Plus we are using mod_rewrite for
> rewriting 1000s of legacy URLs so I don't think we ever considered another
> option.
> > Are there any gotchas w mod_rewrite that you've run into rewriting
> > incoming and outgoing urls?
> > 
> Our biggest problems have been with the legacy URLs. I guess a general
> gotcha could be the regexes for the rewrite; not thinking of anything else.
> If we were using plain sling we would probably be caching with varnish. I
> wonder if that has any rewrite support? Are you using a web cache?

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