tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Matt Parker <mp...@voyanttech.com>
Subject RE: [PATCH] forward instead of redirect for welcome files
Date Tue, 07 Jan 2003 01:41:42 GMT
On Mon, 2003-01-06 at 18:31, Tim Moore wrote:

> Unless I'm missing something, if you don't redirect from /foo to /foo/,
> then you'll have broken relative links even if the welcome file is not
> in a subdirectory.  This would probably be a pretty common problem.
> 
> For example, if your welcome file has <a href="bar.html"> then resolving
> that relative to /foo would give you "/bar.html" while resolving it
> relative to "/foo/" would give you "/foo/bar.html".  That means that
> relative links will either work or not work, depending just on whether
> the trailing slash is there.

you're absolutely right (no pun intended :)

I was spacing out--the redirect is necessary when there's no trailing
slash, but forward is okay when there is a trailing slash. I posted a
new version of the patch that forwards only when there's a trailing
slash...



--
To unsubscribe, e-mail:   <mailto:tomcat-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-dev-help@jakarta.apache.org>


Mime
View raw message