TYPO3: getting relative URLS with "/" in the beginning

789 views Asked by At

There is an extension in my TYPO3 website that uses the following line of Typoscript:

EXT:ts_example/social_bookmarks-min.js

This translates to

typo3conf/ext/ts_example/social_bookmarks-min.js?1416308825

If I use absolute URLs in my website, this is not a problem, but if I intend to use relative URLs, this won't work, as it won't replace the entire pathname of the base URL, since it does not start with "/".

In short, I wish that it would output this instead:

/typo3conf/ext/ts_example/social_bookmarks-min.js?1416308825

Is there a way to achieve this?

1

There are 1 answers

0
biesior On BEST ANSWER

In your main TypoScript use:

config.absRefPrefix = /

and DON't use config.baseURL at the same time!