httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From André Malo ...@perlig.de>
Subject Re: [users@httpd] mod_rewrite per-dir trailing slash problem
Date Thu, 11 Nov 2004 20:55:56 GMT
* "David S. Madole" <david@madole.net> wrote:

> I seem to have encountered a problem with mod_rewrite following an
> upgrade from 2.0.50 to 2.0.52.
> 
> I have many .htaccess files similar to the following:
> 
> RewriteEngine on
> RewriteBase /test
> RewriteCond %{SERVER_PORT} 80
> RewriteRule (.*) https://%{SERVER_NAME}/test/$1 [redirect]
> 
> In this case, the purpose is to redirect the user to an SSL version of
> the URI.
> 
> The problem that I find is that this does not work properly for URIs that
> reference the directory itself without the trailing slash. It appears
> that this was not handled correctly by mod_rewrite on 2.0.50 either, but
> it seems that mod_dir did a redirect before the URI ever got to
> mod_rewrite and so it didn't matter.

Hmm. You mean, mod_dir no longer redirects? Did you change _anything_ else,
besides the httpd version? Is it a vanilla httpd?

> What happens is that the RewriteBase does not match the URI

The rewritebase is not used to match the URI. It's used to prefix the result.
mod_rewrite strips the path of the .htaccess file from the translated
filename.

nd
-- 
"Solides und umfangreiches Buch"
                                          -- aus einer Rezension

<http://pub.perlig.de/books.html#apache2>

---------------------------------------------------------------------
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