httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Garth Winter Webb <ga...@perijove.com>
Subject Re: [users@httpd] Rewriting the Trailing Slash
Date Mon, 05 May 2003 21:11:05 GMT
On Mon, 2003-05-05 at 13:47, Craig Whitmore wrote:
<snip>
> 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.

Are you sure this isn't happening because you rewrite to a relative
path?  Your rewrite rule matches the initial '/' but doesn't capture it
in the parenthesis.  Thus you rewrite the absolute path '/blah' to the
relative path 'blah/'.  

-- 
Garth Winter Webb <garth@perijove.com>

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> 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


Mime
View raw message