Return-Path: Delivered-To: apmail-httpd-users-archive@httpd.apache.org Received: (qmail 10026 invoked by uid 500); 5 May 2003 20:47:08 -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 10013 invoked from network); 5 May 2003 20:47:07 -0000 Received: from loadbalancer-vip.orcon.net.nz (HELO dbmail-mx2.orcon.co.nz) (219.88.242.2) by daedalus.apache.org with SMTP; 5 May 2003 20:47:07 -0000 Received: from PC2 (ip-219-88-240-109.orcon.net.nz [219.88.240.109]) by dbmail-mx2.orcon.co.nz (8.12.6/8.12.6/Debian-7) with SMTP id h45Kk4do031547 for ; Tue, 6 May 2003 08:46:04 +1200 Message-ID: <000d01c31347$7fe1dc20$6df058db@PC2> From: "Craig Whitmore" To: Date: Tue, 6 May 2003 08:47:10 +1200 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1106 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N Subject: [users@httpd] Rewriting the Trailing Slash Hi there I am trying to "fix the trailing slash problem" using rewrite, but the examples given use RewriteBase which you can't use using vhosts. Can anyone help? See my existing config below. ie http://www.website1.com/blah -> http://www.website1.com/blah/ If I use the RewriteCond %{REQUEST_FILENAME} -d RewriteRule ^/(.*)$ $1/ [R] then http://www.website1.com/blah -> http://www.website1.com/home/username/blah/ As it can't remove the /home/username/ as you can't use RewriteBase at all. Thanks Craig Whitmore The Directories are set as /home/username/website1.com /home/username/website2.com etc with vhost.map = domain1.com /home/user1/www.website2.com domain2.com /home/user1/www.website3.com domain3.com /home/user2/www.website4.com etc RewriteEngine on DirectoryIndex index.html index.htm default.htm default.html RewriteMap lowercase int:tolower RewriteMap vhost txt:vhost.map RewriteCond %{REQUEST_FILENAME} !^/cgi-bin/branding.pl RewriteCond %{REQUEST_FILENAME} !^/error RewriteCond %{REQUEST_URI} !^/icons/ RewriteCond %{HTTP_HOST} !^$ RewriteCond ${lowercase:%{HTTP_HOST}|NONE} ^(.+)$ RewriteCond ${vhost:%1} ^(/.*)$ RewriteRule ^/(.*)$ %1/$1 [E=VHOST:${lowercase:%{HTTP_HOST}}] ScriptAlias /cgi-bin/ /hosting/cgi-bin/ #rewriter to add in "banners etc" Action add-header /cgi-bin/branding.pl AddHandler add-header .html .htm .shtml --------------------------------------------------------------------- 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