On 3/26/08, Magnus Haraldsen Amundsen
<[EMAIL PROTECTED]> wrote:
> We have a web app where the images and stylesheets are defined in the
> pipeline as this:
> <map:match pattern="images/*.gif">
> <map:read src="resources/images/{1}.gif" mime-type="image/gif"/>
> </map:match>
>
> In our XSLT we use the following syntax to display the images:
> <img alt="header logo" src="images/header.gif"/>
>
> And this works just fine when the url is like this:
> http://www.example.com/myapp
>
> However, when the url look like this:
> http://www.example.com/myapp/admin
> The images and stylesheets aren't accessed. How can this be solved?
>
> Both the example URLs use the same XSLT to be transformed.
> - Magnus
Research the difference between absolute and relative URLs on
webpages. You can find good material in tutorials about writing HTML.
http://www.example.com/myapp + images/header.gif =
http://www.example.com/images/header.gif [FOUND]
http://www.example.com/myapp/admin + images/header.gif =
http://www.example.com/myapp/images/header.gif [NOT FOUND]
The easy answer is always use absolute URLs (which start with a slash):
<img src="/images/header.gif"/>
http://www.example.com/myapp + /images/header.gif =
http://www.example.com/images/header.gif [FOUND]
http://www.example.com/myapp/admin + /images/header.gif =
http://www.example.com/images/header.gif [FOUND]
Just adding the leading slash should solve your issue.
solprovider
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]