Return-Path: X-Original-To: apmail-sling-users-archive@minotaur.apache.org Delivered-To: apmail-sling-users-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 480309F6A for ; Mon, 6 Feb 2012 11:27:12 +0000 (UTC) Received: (qmail 36747 invoked by uid 500); 6 Feb 2012 11:27:12 -0000 Delivered-To: apmail-sling-users-archive@sling.apache.org Received: (qmail 36659 invoked by uid 500); 6 Feb 2012 11:27:10 -0000 Mailing-List: contact users-help@sling.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@sling.apache.org Delivered-To: mailing list users@sling.apache.org Received: (qmail 36651 invoked by uid 99); 6 Feb 2012 11:27:10 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 06 Feb 2012 11:27:10 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=HS_INDEX_PARAM,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of davidjgonzalez@gmail.com designates 74.125.82.52 as permitted sender) Received: from [74.125.82.52] (HELO mail-ww0-f52.google.com) (74.125.82.52) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 06 Feb 2012 11:27:05 +0000 Received: by wgbds10 with SMTP id ds10so5705422wgb.21 for ; Mon, 06 Feb 2012 03:26:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=references:from:in-reply-to:mime-version:date:message-id:subject:to :content-type; bh=m/lO1H3KfT+eVgWQaj7+6UzuBMReM1TEhbKnJ7NYh3Y=; b=UhnZiliPxgp9wqcm5SMIPmgSiokDABGQEf3l+mzeWvKx1MBg34tsX12m9k3aVcrAoy px/Vr+OEnTLXZLy1UA02uFlBR1/dsZ4OlQ65xDW/wr8GV4fScA2p/1JDmnBBT2ObRTxi b2QeB5Xbf+1r4/K0Dz3SIaDJ3K4wI4iH41khc= Received: by 10.180.92.71 with SMTP id ck7mr34403553wib.3.1328527603684; Mon, 06 Feb 2012 03:26:43 -0800 (PST) References: From: David Gonzalez In-Reply-To: Mime-Version: 1.0 (1.0) Date: Mon, 6 Feb 2012 06:26:41 -0500 Message-ID: <-6817350045038920643@unknownmsgid> Subject: Re: Sling URL Mapping Questions To: "users@sling.apache.org" Content-Type: text/plain; charset=ISO-8859-1 Does mod-rewrite support rewriting all the links in the documents returned in the response? Have you seen perf hits doing this? (I'm assuming every html response must be parsed and rewritten.) Are there any gotchas w mod_rewrite that you've run into rewriting incoming and outgoing urls? Thanks On Feb 6, 2012, at 2:34 AM, James Stansell wrote: > Hi David, > > My sites use apache httpd with mod_rewrite. Have you already considered > that? > > Regards, > > -james. > > On Sat, Feb 4, 2012 at 10:04 PM, David G. wrote: > >> 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: ..com test.siteA.com, >> staging.siteA.com, preprod.siteA.com, www.siteA.com >> Test through Prod also have certain pages that require HTTPS. >> >> >> >> Sites are setup as follows: >> >> /content/site/en/ >> I want to serve pages such that they appear to be served from: >> .siteA.com/.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 www.siteA.com/page.html 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 >> >> www.siteA.com, preprod.siteA.com, staging.siteA.com, test.siteA.com, etc. >> (along with any specific mappings for corner cases like mapping >> .siteA.com/ 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? >> >> Thanks >> >> -- >> David Gonzalez >> Sent with Sparrow (http://www.sparrowmailapp.com/?sig) >> >>