tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From michel <>
Subject Re: URL Rewrite
Date Sun, 05 Sep 2010 14:36:25 GMT

----- Original Message ----- 
From: "André Warnier" <>
To: "Tomcat Users List" <>
Sent: Sunday, September 05, 2010 10:25 AM
Subject: Re: URL Rewrite

> Michel,
> michel wrote:
> ...
>> Konstantin, I fixed the problem! The problem was in the links in the HTML 
>> code. If I do a redirect, then the URL in http: shows the true URL, and 
>> the links in the page were using it for  building the reklative address.
>> Example:
>> with html code <img src="heading/can-post.gif"> is 
>> really
>> in a forward the http in the toolbar might be 
>> so the image is
>> and it can't be found.
>> The solution is to have
>> <base href=> in the page, so the URL building uses 
>> that instead of the misleading URL in the toolbar.
> I have not followed the entire thread in detail, but take this as friendly 
> advice.
> You should really, really, *really* think about what you are doing here, 
> before jumping to what may appear as a solution now, but is going to give 
> you a lot of trouble and extra work further down the line.
> I mean the "<base href=" thing.
> Basically this is, in my view, a "sparadrap on a wooden leg" kind of 
> solution (culturally, you should understand what I mean).
> Unless your website is really small (meaning there are just a few pages), 
> and will stay that way in the future, I would really not recommend the 
> "base href" solution.
> The "base href" option basically stops the browsers from interpreting 
> links in the "natural" way, and forces them to interpret them in an 
> "unnatural" way.  This can mean that you will have, forever, to write 
> *all* your HTML pages in a certain way, different from the way that HTML 
> editors and content management systems expect.  And that can give you a 
> lot of work in the future.
> It would be far better to really understand the way in which a browser 
> naturally interprets relative links, and to make sure that your server 
> does things in such a way that these pages are sent to the browser with 
> the correct links in the first place.

André, I am not sure that I understand but I think that I do. In this case, 
I believe that HTML  does interpret links in a natural way. Normally, the 
HTML picks up the base href from the toolbar. In the case of a forward with 
a  clean URL in the toolbar, we already have an unnatural HTML process going 
on. But I am only using the base href on that single page anyway.



To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message