Return-Path: Delivered-To: apmail-httpd-users-archive@www.apache.org Received: (qmail 68881 invoked from network); 22 Dec 2004 18:46:24 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 22 Dec 2004 18:46:24 -0000 Received: (qmail 44046 invoked by uid 500); 22 Dec 2004 18:46:05 -0000 Delivered-To: apmail-httpd-users-archive@httpd.apache.org Received: (qmail 44027 invoked by uid 500); 22 Dec 2004 18:46:04 -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: Delivered-To: mailing list users@httpd.apache.org Received: (qmail 44011 invoked by uid 99); 22 Dec 2004 18:46:04 -0000 X-ASF-Spam-Status: No, hits=-0.1 required=10.0 tests=RCVD_IN_BSP_OTHER X-Spam-Check-By: apache.org Received-SPF: pass (hermes.apache.org: local policy) Received: from amsterdam.ucdavis.edu (HELO amsterdam.ucdavis.edu) (169.237.104.160) by apache.org (qpsmtpd/0.28) with ESMTP; Wed, 22 Dec 2004 10:46:00 -0800 Received: from raja.ucdavis.edu (unexmail.ucdavis.edu [128.120.133.3]) by amsterdam.ucdavis.edu (8.12.10/8.12.9/it-defang-5.2.0) with ESMTP id iBMIjuW9018288 for ; Wed, 22 Dec 2004 10:45:56 -0800 (PST) Received: from [152.79.198.38] (UNEXGAL38.ucdmc.ucdavis.edu [152.79.198.38]) by raja.ucdavis.edu with SMTP (Microsoft Exchange Internet Mail Service Version 5.5.2657.72) id 30CSMDY2; Wed, 22 Dec 2004 10:45:56 -0800 Message-ID: <41C9C138.3080503@unexmail.ucdavis.edu> Date: Wed, 22 Dec 2004 10:47:20 -0800 From: Richard Crawford Reply-To: rcrawford@unexmail.ucdavis.edu User-Agent: Mozilla Thunderbird 1.0 (Windows/20041206) X-Accept-Language: en-us, en MIME-Version: 1.0 To: users@httpd.apache.org Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.41 X-Virus-Checked: Checked Subject: [users@httpd] Still messing with rewrites X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N A couple of months ago I wrote to this list asking for assistance with mod_rewrite, since it was then possible to enter a URL in a certain way and see the Cold Fusion source code for our website. I would like to extend my appreciation to everyone who assisted and gave me suggestions. There's still one issue, however. If a user enters two slashes in the address bar of their browser, they will still be able to see the CF source code of our homepage; specifically, if they enter: http://ourbrokensite.com//DLC or http://ourbrokensite.com//DLC/ they'll see the source code. Ideally, if they enter this URL, they'll be redirected to: http://ourbrokensite.com/cfmx/DLC/ If they enter anything after the DLC string, they'll be redirected properly. It's only when entering the // before the DLC with no strings after the DLC. This is what I have in the Rewrite section of httpd.conf: RewriteEngine on RewriteRule ^/cfmx(.*\.pl)$ /$1 [R,L] RewriteCond %{THE_REQUEST} !\.pl [OR] RewriteCond %{THE_REQUEST} /+DLC/$ [OR] RewriteCond %{THE_REQUEST} /+DLC RewriteRule ^/+DLC/(.*)$ /cfmx/DLC/$1 [R,L] RewriteRule ^$ /cfmx/DLC/ [R,L] RewriteRule ^/$ /cfmx/DLC/ [R,L] It seems to work for the most part, but there's obviously something that I'm missing. -- Richard S. Crawford Programmer III UC Davis Extension Distance Education Group (http://unexdlc.ucdavis.edu) 2901 K Street, Suite 200C Sacramento, CA 95816 (916)327-7793 --------------------------------------------------------------------- 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