Return-Path: Delivered-To: apmail-httpd-users-archive@www.apache.org Received: (qmail 47869 invoked from network); 6 Oct 2010 08:29:50 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 6 Oct 2010 08:29:50 -0000 Received: (qmail 48185 invoked by uid 500); 6 Oct 2010 08:29:47 -0000 Delivered-To: apmail-httpd-users-archive@httpd.apache.org Received: (qmail 48052 invoked by uid 500); 6 Oct 2010 08:29:44 -0000 Mailing-List: contact users-help@httpd.apache.org; run by ezmlm Precedence: bulk Reply-To: users@httpd.apache.org list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list users@httpd.apache.org Received: (qmail 48042 invoked by uid 99); 6 Oct 2010 08:29:43 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 06 Oct 2010 08:29:43 +0000 X-ASF-Spam-Status: No, hits=0.7 required=10.0 tests=RCVD_IN_DNSWL_NONE,SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (nike.apache.org: local policy) Received: from [209.85.216.173] (HELO mail-qy0-f173.google.com) (209.85.216.173) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 06 Oct 2010 08:29:36 +0000 Received: by qyk32 with SMTP id 32so3027530qyk.18 for ; Wed, 06 Oct 2010 01:29:15 -0700 (PDT) MIME-Version: 1.0 Received: by 10.224.196.71 with SMTP id ef7mr3047927qab.356.1286353755582; Wed, 06 Oct 2010 01:29:15 -0700 (PDT) Received: by 10.229.62.143 with HTTP; Wed, 6 Oct 2010 01:29:15 -0700 (PDT) In-Reply-To: References: Date: Wed, 6 Oct 2010 09:29:15 +0100 Message-ID: From: Ben Short To: users@httpd.apache.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org Subject: Re: [users@httpd] Rewrite main.css to main-min.css Hi Craig, Some background... As part of the build process my web application minimizes and gzips all the style sheets and javascript files. So I end up with main.css main-min.css and main-min.css.gz. The web page will make a request for main.css but I need to use rewrite to return then main-min.css.gz file. Ben On 6 October 2010 04:34, Craig Huffstetler wr= ote: >> Is it possible to use mod_rewrite to alter a request for main.css to >> main-min.css? > > Yes, but for some reason I think this is more complex. However, I will > answer given the scope given: > > If mod_rewrite is active then add this to .htaccess: > > RewriteEngine on > RewriteRule main.css main-min.css > > There are no directories or special rules for this, Ben? I don't quite > understand why you even need to use mod_rewrite in this case. > > Craig > > --------------------------------------------------------------------- > The official User-To-User support forum of the Apache HTTP Server Project= . > See for more info. > To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org > =A0 " =A0 from the digest: users-digest-unsubscribe@httpd.apache.org > For additional commands, e-mail: users-help@httpd.apache.org > > --------------------------------------------------------------------- The official User-To-User support forum of the Apache HTTP Server Project. See for more info. To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org " from the digest: users-digest-unsubscribe@httpd.apache.org For additional commands, e-mail: users-help@httpd.apache.org