[TYPO3] relative path mistaken

Xavier Perseguers typo3 at perseguers.ch
Tue Jul 15 23:45:15 CEST 2008


Hi,

> did ya try
> 
> page.CSS_inlineStyle (
>     div #header { background-image:
> url('fileadmin/template/main/img/header_eng.png'); }
> )
> 
> without the trailing slash?

This would only work for a page located at the root of the page tree.

> IMHO the baserurl
> http://www.mydomain.com/dev/
> already delivers the slash and prepending it to the
> background-image: url('/fileadmin/template/main/img/header_eng.png')
> would lead to a path like
> http://www.mydomain.com/dev//fileadmin/template/main/img/header_eng.png

No! As I said it has nothing to do with TYPO3, this is browser related 
and will lead to trying to fetch 
http://www.mydomain.com/fileadmin/template/main/img/header_eng.png. The 
browser isn't aware of any baseurl or those stuff, it is asked to fetch 
/fileadmin... and in HTTP this means relative to the real root of the 
domain, not any root of something else.


-- 
Xavier Perseguers
http://xavier.perseguers.ch/en


More information about the TYPO3-english mailing list